The bot for Checkpoint 1
This is a bot to help with tournament and verification season management for Checkpoint 1. It is partially derived from my rewrite of Radia, however, there are still many custom-built cogs.
This is for staff members, for non-staff members, type !help
.
Players are verified based on their ranks, and will recieve a rank role. Seasons are used to avoid outdated ranks, at the start of each new season, all of the rank roles are replaced.
Additionally, a Verified role is used to handle channel permissions and channel access. This role is not replaced each season. However, it may be pruned every couple of seasons.
Here is how the verification process works.
- A user makes a role request in the respective channel, showing proof of their rank and asking for the correct role.
- A Barista verifies the user and gives them the
Verified
role and their respective rank role.
The !season
command group is used to manage season rank roles.
!season
List the season roles. The command will also tell you the index of each tournament, this is important.- Alternatively, as an alias, you can use
!season roles
for the same result.
- Alternatively, as an alias, you can use
!season delete
Removes the old season roles.- If you are afraid it will delete the wrong roles, you can double-check what roles it will be deleting by doing
!season
or!season list
.
- If you are afraid it will delete the wrong roles, you can double-check what roles it will be deleting by doing
!season new <name> [delete=False]
Creates new season roles, you are required to specify the name of the season.<name>
: Any name works, but if you specify a literal season (such as 'winter'), it will automatically convert it into an emoji.[delete=False]
: Additionally, you can specify to automatically call delete old season roles before creating new roles (!season new spring true
).
!season prune
Removes the Verified role from anyone without a season rank role.- This is helpful every couple of seasons when you want to remove the verified role from those who have neglected to request a role for a while.
!whatis
is used to quickly look up glossary terms, and tournament rules, such as "dc", "swiss", and "glossary" (yes, the glossary includes a glossary). Requires thegoogle.json
file (see Google Setup).
These commands are used like !whatis battlefy
, if you omit the argument, the bot will automatically list all the possible options.
- Make sure you have Docker installed.
- A Google API project for the bot.
- Enable the following API
- Go to the API & Services and navigate to
credentials
tab - Click on
+ create credentials
and create a newService Accounts
fill in the necessary field.- When you get to Role give it
editor
.
- When you get to Role give it
- Download the
credentials
files and rename itgoogle.json
- Share the Google Sheet with the
client_email
from the json file. - Copy the gsheet key from the url at
https://docs.google.com/spreadsheets/d/
{key}
/edit
, you will use this in the.env
-
Create a
.env
in the repository root:TOKEN = discord.bot.token GSHEET = gsheet_key SENTRY = "System Environment" # Optional DEBUG = 1 # Optional
Please know that there are no
true
orfalse
values in.env
files. If you want to set a key to false, set it to0
-
Run
docker-compose up
in the repository root.
empathy included • @cysabi • cysabi.github.io