Discord bot#
Game Master is the guild’s Discord bot, built with discord.py. It posts events and takes sign-ups, hands out roles based on the website, awards chat levels and badges, and moderates the server.
The bot never opens the database. It talks to the website’s API only over HTTP, with a shared
key (the X-API-Key header). Anything it remembers lives on the website.
Main parts#
Folder |
What’s in it |
|---|---|
|
One file per feature: events, roles, levels, moderation, and so on. See How it works. |
|
The only code that calls the website’s API. |
|
Guards every role grant and revoke; see How it works. |
|
The badge, level and gate role images. |
|
Boots a real copy of the website’s API in-process for each test, so tests check real request and reply shapes. |
flowchart LR
Discord <-->|gateway + REST| Bot["bot<br/>discord.py plugins"]
Bot -->|"/api/guilds/... + X-API-Key"| API["website: api/<br/>Litestar backend"]
Pages#
Run it locally: set it up and start it
Test and check: what
make cirunsHow it works: plugins, the API client, role safety, and command limits
Deploy: what happens after you push, and the sidequest-common pin
README: the repo’s own README