Skip to main content

A Discord bot for SpellTable

Project description

SpellBot

build pypi codecov python black mit

A Discord bot for SpellTable.

add-bot

📱 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.

  • !about: Get information about SpellBot
  • !help: Provides detailed help about all of the following commands
  • !hello: Says hello
  • !queue: Enter into a queue for an EDH game
  • !leave: Leave the play queue that you are in

WIP: Commands

Queue

In a text channel or as a DM to the bot:

!queue <format> [power level]
  • Verifies that you're not in a queue yet
  • Sends a DM to you indicating that you're in the queue
  • When matchmaking is complete:
    • Creates a SpellTable link
    • DMs everyone in the match the link

Questions:

  • What if someone want's to queue with someone else?
  • Maybe: `!queue [power level] @with_this_person @and_this_person etc... ???

Status

As a DM to the bot:

!status
  • Gives you some information on your place in the queue
  • Possibly give you some status on your history of games and win/lose

Reporting

In a text channel:

!report win @username[, @username, @username, ...]
!report draw @username[, @username, @username, ...]
  • Automatically know what game based on the last game in which that user was a member of
  • Indicates that @username is the winner of their match
  • Potentially there could be multiple winners or draws
  • Allow for mistakes, user's should be able to run report multiple times
  • At some point after the first report, reporting needs be finalized
  • Do we need a !report loss command for any reason?

Moderation

As a DM to the bot by an authorized user:

!ban @username <reason> [minutes]
  • Block the user from being able to use the bot (optionally for the given minutes)
!unban @username
  • Remove user from the block list
!bans
  • Show the list of bans and reasons
!ops @username
  • Authorize someone else to be able to moderate
!unops @username
  • Remove someone from moderation
!admin @username
  • Authorize someone to be able to administrate
!unadmin @username
  • Remove someone from administrators
!report ... ?
  • Potentially have mods/admins be able to go in and manually change reports if need be

Concerns / Thoughts / Ideas

  • After a game is created, it needs to expire at some point
  • After a report is done, how long until the report command stops working
  • Does a user's game need to be reported before they can re-queue?
  • What happens if a game is never reported on?
  • When matchmaking w/ power levels, does it need to be a 100% match, +/- how much?
  • What about using ELO to match make?

🤖 Running SpellBot

First install spellbot using pip:

pip install spellbot

Provide your Discord bot token with the environment variable SPELLBOT_TOKEN.

By default SpellBot will use sqlite3 as its database. You can however choose to use another database by providing a SQLAlchemy Connection 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. See our documentation on Docker Support for help.

❤️ 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 and then see our documentation on how to contribute for details on how to get started.


MIT © amy@lexicalunit et al

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spellbot-0.3.0.tar.gz (15.7 kB view hashes)

Uploaded Source

Built Distribution

spellbot-0.3.0-py3-none-any.whl (15.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page