spellbot


Namespellbot JSON
Version 5.7.0 PyPI version JSON
download
home_pagehttp://spellbot.io/
SummaryThe Discord bot for SpellTable
upload_time2020-10-28 03:51:37
maintainer
docs_urlNone
authorAmy
requires_python>=3.7,<4
licenseMIT
keywords discord magic bot mtg spelltable
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <img align="right" width="200" src="https://raw.githubusercontent.com/lexicalunit/spellbot/master/spellbot.png" />

# SpellBot

[![build][build-badge]][build]
[![top][top-badge]][top]
[![uptime][uptime-badge]][uptime]
[![metrics][metrics-badge]][metrics]
[![pypi][pypi-badge]][pypi]
[![codecov][codecov-badge]][codecov]
[![CodeFactor][factor-badge]][factor]
[![python][python-badge]][python]
[![black][black-badge]][black]
[![mit][mit-badge]][mit]
[![follow][follow-badge]][follow]

The Discord bot for [SpellTable][spelltable].

[![add-bot][add-bot-button]][add-bot]

[![ko-fi][kofi-button]][ko-fi]

## 🤖 Using SpellBot

Once you've connected the bot to your server, you can interact with it over
Discord via the following commands in any of the authorized channels. **Keep in
mind that sometimes SpellBot will respond to you via Direct Message to avoid
being too spammy in text channels.**

- `!spellbot help`: Provides detailed help about all of the following commands.
- `!about`: Get information about SpellBot and its creators.

> **Note:** To use the
> [commands for event runners](#%EF%B8%8F-commands-for-event-runners)
> and [commands for admins](#-commands-for-admins), you will need to
> [create a role on your server][create-role] called `SpellBot Admin`
> (capitalization matters). Only users with that role will be able to use those
> commands.

### ✋ Commands for Players

Just looking to play some games of Magic? These commands are for you!

- `!lfg`: Find or start up a game of Magic: The Gathering!
- `!leave`: Leave any games that you've signed up for.
- `!power`: Set your current power level.
- `!report`: Report the results of the game you just played.
- `!team`: Join one of the teams available on your server.
- `!points`: Find out how many points you currently have.

When you run the `!lfg` command, SpellBot will post a message for sign ups.

![lfg][lfg]

Other users can react to it with the ✋ emoji to be added to the game. When the
game is ready, SpellBot will update the message with your SpellTable details.

![ready][ready]

Users can also use the 🚫 emoji reaction to leave the game.

### 🎟️ Commands for Event Runners

These commands are intended to be run by SpellBot Admins and help facilitate
online events.

- `!game`: Directly create games for the mentioned users.
- `!event`: Create a bunch of games all at once based on some uploaded data.
- `!begin`: Start an event that you previously created with `!event`.
- `!export`: Export historical game data for your server.

### 👑 Commands for Admins

These commands will help you configure SpellBot for your server.

- `!spellbot`: This command allows admins to configure SpellBot for their
               server. It supports the following subcommands:
  - `config`: Just show the current configuration for this server.
  - `channels`: Set the channels SpellBot is allowed to operate within.
  - `prefix`: Set the command prefix for SpellBot in text channels.
  - `links`: Set the privacy level for generated SpellTable links.
  - `expire`: Set how many minutes before games are expired due to inactivity.
  - `teams`: Sets the teams available on this server.
  - `power`: Turns the power command on or off for this server.
  - `voice`: When on, SpellBot will automatically create voice channels.
  - `tags`: Turn on or off the ability to use tags on your server.
  - `smotd`: Set the server message of the day.
  - `motd`: Set the privacy level for messages of the day.
  - `help`: Get detailed usage help for SpellBot.

### 🛋️ Ergonomics

SpellBot will always try and assume useful defaults or try to do the right thing
when you give it a command. For example if you use the tag <code>~modern</code>
or other format names when creating a game, it will automatically assume the
correct number of players for you. Hopefully these features are intuitive and
helpful 🤞 — and if not, [please report bugs and request features][issues]
to your heart's content.

### 🎤 Feedback

Thoughts and suggestions? Come join us on the
[SpellTable Discord server][discord-invite]! Please also feel free
to [directly report any bugs][issues] that you encounter.

## 🙌 Support Me

I'm keeping SpellBot running using my own money but if you like the bot and want
to help me out, please consider donating to [my Ko-fi][ko-fi].

## ❤️ Contributing

If you'd like to become a part of the SpellBot development community please
first know that we have a documented [code of conduct](CODE_OF_CONDUCT.md) and
then see our [documentation on how to contribute](CONTRIBUTING.md) for details
on how to get started.

## 🔧 Running SpellBot Yourself

First install `spellbot` using [`pip`](https://pip.pypa.io/en/stable/):

```shell
pip install spellbot
```

Provide your Discord bot token with the environment variable `SPELLBOT_TOKEN`.
As well as your SpellTable API authorization token via `SPELLTABLE_AUTH`.

You can get [your bot token from Discord][discord-bot-docs]. Your bot will
need the following permissions enabled:

- Manage Channels
- Create Instant Invite
- View Channels
- Send Messages
- Manage Messages
- Embed Links
- Read Message History
- Add Reactions

As for the SpellTable API authorization token, you'll have to talk to the
SpellTable developers. Come join us on the
[SpellTable Discord server][spelltable-discord].

By default SpellBot will use sqlite3 as its database. You can however choose to
use another database by providing a [SQLAlchemy Connection URL][db-url]. This
can be done via the `--database-url` command line option or the environment
variable `SPELLBOT_DB_URL`. Note that, at the time of this writing, SpellBot is
only tested against sqlite3 and PostgreSQL.

More usage help can be found by running `spellbot --help`.

## 🐳 Docker Support

You can also run SpellBot via docker. Our image is published to
[lexicalunit/spellbot][docker-hub]. See [our documentation on Docker Support](DOCKER.md) for help
with installing and using it.

---

[MIT][mit] © [amy@lexicalunit][lexicalunit] et [al][contributors]

[add-bot-button]:     https://user-images.githubusercontent.com/1903876/88951823-5d6c9a00-d24b-11ea-8523-d256ccbf4a3c.png
[add-bot]:            https://discordapp.com/api/oauth2/authorize?client_id=725510263251402832&permissions=93265&scope=bot
[black-badge]:        https://img.shields.io/badge/code%20style-black-000000.svg
[black]:              https://github.com/psf/black
[build-badge]:        https://github.com/lexicalunit/spellbot/workflows/build/badge.svg
[build]:              https://github.com/lexicalunit/spellbot/actions
[codecov-badge]:      https://codecov.io/gh/lexicalunit/spellbot/branch/master/graph/badge.svg
[codecov]:            https://codecov.io/gh/lexicalunit/spellbot
[contributors]:       https://github.com/lexicalunit/spellbot/graphs/contributors
[create-role]:        https://support.discord.com/hc/en-us/articles/206029707-How-do-I-set-up-Permissions-
[db-url]:             https://docs.sqlalchemy.org/en/latest/core/engines.html
[discord-bot-docs]:   https://discord.com/developers/docs/topics/oauth2#bots
[discord-invite]:     https://discord.gg/zXzgqMN
[docker-hub]:         https://hub.docker.com/r/lexicalunit/spellbot
[factor-badge]:       https://www.codefactor.io/repository/github/lexicalunit/spellbot/badge
[factor]:             https://www.codefactor.io/repository/github/lexicalunit/spellbot
[follow-badge]:       https://img.shields.io/twitter/follow/SpellBotIO?style=social
[follow]:             https://twitter.com/intent/follow?screen_name=SpellBotIO
[issues]:             https://github.com/lexicalunit/spellbot/issues
[ko-fi]:              https://ko-fi.com/Y8Y51VTHZ
[kofi-button]:        https://user-images.githubusercontent.com/1903876/88951826-5e053080-d24b-11ea-9a81-f1b5431a5d4b.png
[lexicalunit]:        http://github.com/lexicalunit
[lfg]:                https://user-images.githubusercontent.com/1903876/91242259-cedd2280-e6fb-11ea-8d30-e7127b6f96e9.png
[mit-badge]:          https://img.shields.io/badge/License-MIT-yellow.svg
[mit]:                https://opensource.org/licenses/MIT
[pypi-badge]:         https://img.shields.io/pypi/v/spellbot
[pypi]:               https://pypi.org/project/spellbot/
[python-badge]:       https://img.shields.io/badge/python-3.7+-blue.svg
[python]:             https://www.python.org/
[ready]:              https://user-images.githubusercontent.com/1903876/91242257-cdabf580-e6fb-11ea-86ad-8f1aaf6d34dc.png
[spelltable-discord]: https://discord.gg/zXzgqMN
[spelltable]:         https://www.spelltable.com/
[top-badge]:          https://top.gg/api/widget/status/725510263251402832.svg?noavatar=true
[top]:                https://top.gg/bot/725510263251402832
[uptime-badge]:       https://img.shields.io/uptimerobot/ratio/m785764282-c51c742e56a87d802968efcc
[uptime]:             https://uptimerobot.com/dashboard#785764282
[metrics-badge]:      https://img.shields.io/badge/metrics-grafana-orange.svg
[metrics]:            https://lexicalunit.grafana.net/d/4TSUCbcMz/spellbot?orgId=1

            

Raw data

            {
    "_id": null,
    "home_page": "http://spellbot.io/",
    "name": "spellbot",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7,<4",
    "maintainer_email": "",
    "keywords": "discord,magic,bot,mtg,SpellTable",
    "author": "Amy",
    "author_email": "amy@lexicalunit.com",
    "download_url": "https://files.pythonhosted.org/packages/b6/d0/eef8b6deab225191dddbe148cc888ff04116698969ef017d94e131e1e8f9/spellbot-5.7.0.tar.gz",
    "platform": "",
    "description": "<img align=\"right\" width=\"200\" src=\"https://raw.githubusercontent.com/lexicalunit/spellbot/master/spellbot.png\" />\n\n# SpellBot\n\n[![build][build-badge]][build]\n[![top][top-badge]][top]\n[![uptime][uptime-badge]][uptime]\n[![metrics][metrics-badge]][metrics]\n[![pypi][pypi-badge]][pypi]\n[![codecov][codecov-badge]][codecov]\n[![CodeFactor][factor-badge]][factor]\n[![python][python-badge]][python]\n[![black][black-badge]][black]\n[![mit][mit-badge]][mit]\n[![follow][follow-badge]][follow]\n\nThe Discord bot for [SpellTable][spelltable].\n\n[![add-bot][add-bot-button]][add-bot]\n\n[![ko-fi][kofi-button]][ko-fi]\n\n## \ud83e\udd16 Using SpellBot\n\nOnce you've connected the bot to your server, you can interact with it over\nDiscord via the following commands in any of the authorized channels. **Keep in\nmind that sometimes SpellBot will respond to you via Direct Message to avoid\nbeing too spammy in text channels.**\n\n- `!spellbot help`: Provides detailed help about all of the following commands.\n- `!about`: Get information about SpellBot and its creators.\n\n> **Note:** To use the\n> [commands for event runners](#%EF%B8%8F-commands-for-event-runners)\n> and [commands for admins](#-commands-for-admins), you will need to\n> [create a role on your server][create-role] called `SpellBot Admin`\n> (capitalization matters). Only users with that role will be able to use those\n> commands.\n\n### \u270b Commands for Players\n\nJust looking to play some games of Magic? These commands are for you!\n\n- `!lfg`: Find or start up a game of Magic: The Gathering!\n- `!leave`: Leave any games that you've signed up for.\n- `!power`: Set your current power level.\n- `!report`: Report the results of the game you just played.\n- `!team`: Join one of the teams available on your server.\n- `!points`: Find out how many points you currently have.\n\nWhen you run the `!lfg` command, SpellBot will post a message for sign ups.\n\n![lfg][lfg]\n\nOther users can react to it with the \u270b emoji to be added to the game. When the\ngame is ready, SpellBot will update the message with your SpellTable details.\n\n![ready][ready]\n\nUsers can also use the \ud83d\udeab emoji reaction to leave the game.\n\n### \ud83c\udf9f\ufe0f Commands for Event Runners\n\nThese commands are intended to be run by SpellBot Admins and help facilitate\nonline events.\n\n- `!game`: Directly create games for the mentioned users.\n- `!event`: Create a bunch of games all at once based on some uploaded data.\n- `!begin`: Start an event that you previously created with `!event`.\n- `!export`: Export historical game data for your server.\n\n### \ud83d\udc51 Commands for Admins\n\nThese commands will help you configure SpellBot for your server.\n\n- `!spellbot`: This command allows admins to configure SpellBot for their\n               server. It supports the following subcommands:\n  - `config`: Just show the current configuration for this server.\n  - `channels`: Set the channels SpellBot is allowed to operate within.\n  - `prefix`: Set the command prefix for SpellBot in text channels.\n  - `links`: Set the privacy level for generated SpellTable links.\n  - `expire`: Set how many minutes before games are expired due to inactivity.\n  - `teams`: Sets the teams available on this server.\n  - `power`: Turns the power command on or off for this server.\n  - `voice`: When on, SpellBot will automatically create voice channels.\n  - `tags`: Turn on or off the ability to use tags on your server.\n  - `smotd`: Set the server message of the day.\n  - `motd`: Set the privacy level for messages of the day.\n  - `help`: Get detailed usage help for SpellBot.\n\n### \ud83d\udecb\ufe0f Ergonomics\n\nSpellBot will always try and assume useful defaults or try to do the right thing\nwhen you give it a command. For example if you use the tag <code>~modern</code>\nor other format names when creating a game, it will automatically assume the\ncorrect number of players for you. Hopefully these features are intuitive and\nhelpful \ud83e\udd1e \u2014 and if not, [please report bugs and request features][issues]\nto your heart's content.\n\n### \ud83c\udfa4 Feedback\n\nThoughts and suggestions? Come join us on the\n[SpellTable Discord server][discord-invite]! Please also feel free\nto [directly report any bugs][issues] that you encounter.\n\n## \ud83d\ude4c Support Me\n\nI'm keeping SpellBot running using my own money but if you like the bot and want\nto help me out, please consider donating to [my Ko-fi][ko-fi].\n\n## \u2764\ufe0f Contributing\n\nIf you'd like to become a part of the SpellBot development community please\nfirst know that we have a documented [code of conduct](CODE_OF_CONDUCT.md) and\nthen see our [documentation on how to contribute](CONTRIBUTING.md) for details\non how to get started.\n\n## \ud83d\udd27 Running SpellBot Yourself\n\nFirst install `spellbot` using [`pip`](https://pip.pypa.io/en/stable/):\n\n```shell\npip install spellbot\n```\n\nProvide your Discord bot token with the environment variable `SPELLBOT_TOKEN`.\nAs well as your SpellTable API authorization token via `SPELLTABLE_AUTH`.\n\nYou can get [your bot token from Discord][discord-bot-docs]. Your bot will\nneed the following permissions enabled:\n\n- Manage Channels\n- Create Instant Invite\n- View Channels\n- Send Messages\n- Manage Messages\n- Embed Links\n- Read Message History\n- Add Reactions\n\nAs for the SpellTable API authorization token, you'll have to talk to the\nSpellTable developers. Come join us on the\n[SpellTable Discord server][spelltable-discord].\n\nBy default SpellBot will use sqlite3 as its database. You can however choose to\nuse another database by providing a [SQLAlchemy Connection URL][db-url]. This\ncan be done via the `--database-url` command line option or the environment\nvariable `SPELLBOT_DB_URL`. Note that, at the time of this writing, SpellBot is\nonly tested against sqlite3 and PostgreSQL.\n\nMore usage help can be found by running `spellbot --help`.\n\n## \ud83d\udc33 Docker Support\n\nYou can also run SpellBot via docker. Our image is published to\n[lexicalunit/spellbot][docker-hub]. See [our documentation on Docker Support](DOCKER.md) for help\nwith installing and using it.\n\n---\n\n[MIT][mit] \u00a9 [amy@lexicalunit][lexicalunit] et [al][contributors]\n\n[add-bot-button]:     https://user-images.githubusercontent.com/1903876/88951823-5d6c9a00-d24b-11ea-8523-d256ccbf4a3c.png\n[add-bot]:            https://discordapp.com/api/oauth2/authorize?client_id=725510263251402832&permissions=93265&scope=bot\n[black-badge]:        https://img.shields.io/badge/code%20style-black-000000.svg\n[black]:              https://github.com/psf/black\n[build-badge]:        https://github.com/lexicalunit/spellbot/workflows/build/badge.svg\n[build]:              https://github.com/lexicalunit/spellbot/actions\n[codecov-badge]:      https://codecov.io/gh/lexicalunit/spellbot/branch/master/graph/badge.svg\n[codecov]:            https://codecov.io/gh/lexicalunit/spellbot\n[contributors]:       https://github.com/lexicalunit/spellbot/graphs/contributors\n[create-role]:        https://support.discord.com/hc/en-us/articles/206029707-How-do-I-set-up-Permissions-\n[db-url]:             https://docs.sqlalchemy.org/en/latest/core/engines.html\n[discord-bot-docs]:   https://discord.com/developers/docs/topics/oauth2#bots\n[discord-invite]:     https://discord.gg/zXzgqMN\n[docker-hub]:         https://hub.docker.com/r/lexicalunit/spellbot\n[factor-badge]:       https://www.codefactor.io/repository/github/lexicalunit/spellbot/badge\n[factor]:             https://www.codefactor.io/repository/github/lexicalunit/spellbot\n[follow-badge]:       https://img.shields.io/twitter/follow/SpellBotIO?style=social\n[follow]:             https://twitter.com/intent/follow?screen_name=SpellBotIO\n[issues]:             https://github.com/lexicalunit/spellbot/issues\n[ko-fi]:              https://ko-fi.com/Y8Y51VTHZ\n[kofi-button]:        https://user-images.githubusercontent.com/1903876/88951826-5e053080-d24b-11ea-9a81-f1b5431a5d4b.png\n[lexicalunit]:        http://github.com/lexicalunit\n[lfg]:                https://user-images.githubusercontent.com/1903876/91242259-cedd2280-e6fb-11ea-8d30-e7127b6f96e9.png\n[mit-badge]:          https://img.shields.io/badge/License-MIT-yellow.svg\n[mit]:                https://opensource.org/licenses/MIT\n[pypi-badge]:         https://img.shields.io/pypi/v/spellbot\n[pypi]:               https://pypi.org/project/spellbot/\n[python-badge]:       https://img.shields.io/badge/python-3.7+-blue.svg\n[python]:             https://www.python.org/\n[ready]:              https://user-images.githubusercontent.com/1903876/91242257-cdabf580-e6fb-11ea-86ad-8f1aaf6d34dc.png\n[spelltable-discord]: https://discord.gg/zXzgqMN\n[spelltable]:         https://www.spelltable.com/\n[top-badge]:          https://top.gg/api/widget/status/725510263251402832.svg?noavatar=true\n[top]:                https://top.gg/bot/725510263251402832\n[uptime-badge]:       https://img.shields.io/uptimerobot/ratio/m785764282-c51c742e56a87d802968efcc\n[uptime]:             https://uptimerobot.com/dashboard#785764282\n[metrics-badge]:      https://img.shields.io/badge/metrics-grafana-orange.svg\n[metrics]:            https://lexicalunit.grafana.net/d/4TSUCbcMz/spellbot?orgId=1\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "The Discord bot for SpellTable",
    "version": "5.7.0",
    "split_keywords": [
        "discord",
        "magic",
        "bot",
        "mtg",
        "spelltable"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "52b383536a6ae219d9da2f188d5b61a7",
                "sha256": "dbfa7f759c31032724f61741fd4559325c9140c19cb0886a82de4ecd48f13756"
            },
            "downloads": -1,
            "filename": "spellbot-5.7.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "52b383536a6ae219d9da2f188d5b61a7",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7,<4",
            "size": 64713,
            "upload_time": "2020-10-28T03:51:36",
            "upload_time_iso_8601": "2020-10-28T03:51:36.291130Z",
            "url": "https://files.pythonhosted.org/packages/5b/76/bcd0426e82c84fbedb2e901ad54e00a619f6116e2d4613a04bb76e78da9a/spellbot-5.7.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "ea7a208b29fcb2122efa152020739363",
                "sha256": "03522a5c32f9e401feda88394afa056a0b260dc533e0b6c00077d6a7113b35ff"
            },
            "downloads": -1,
            "filename": "spellbot-5.7.0.tar.gz",
            "has_sig": false,
            "md5_digest": "ea7a208b29fcb2122efa152020739363",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7,<4",
            "size": 49381,
            "upload_time": "2020-10-28T03:51:37",
            "upload_time_iso_8601": "2020-10-28T03:51:37.506783Z",
            "url": "https://files.pythonhosted.org/packages/b6/d0/eef8b6deab225191dddbe148cc888ff04116698969ef017d94e131e1e8f9/spellbot-5.7.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2020-10-28 03:51:37",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "spellbot"
}
        
Amy
Elapsed time: 0.20122s