A simple Discord application (slash command) that overlays a ChaosDAO ring on top of user-provided image based on the user's role.
- The user types
/ring
in a channel. - A form with a field for attachment is displayed.
- The user adds a file and sends.
- The app responds with progress message.
- A few seconds later the app responds with an image.
The application requires the following environment variables to be set:
- Discord token - a token obtained when the discord application was linked to a bot in the Discord's dashboard
- The way Apps work they have to be "linked" to a bot. You have to add a bot under your Application but you don't need to assign it any permissions at all.
- To generate an invitation link for the app, go to "URL Generator" under "OAuth2" and generate a url with just the
applications.commands
scope selected. - Use this link to add the app to any of your servers.
- Role IDs - actual Discord user Roles
- One for each of Frens, Regulars and DAOists
- Image Paths - the ring images used as overlays
- One file for each of Frens, Regulars and DAOists
These names of the environment variables (and example values) are:
CHAOSRING_DAOISTS=/path/to/daoists_ring.png
CHAOSRING_FRENS=/path/to/frens_ring.png
CHAOSRING_REGULARS=/path/to/regulars_ring.png
DAO_ROLE_DAOIST=<role_id>
DAO_ROLE_FREN=<role_id>
DAO_ROLE_REGULAR=<role_id>
DISCORD_TOKEN=<token>
This bot also supports .env
files using the same name of variables. A .env.sample
file is provided. Rename it to .env once you have filled out the values.
docker build --platform linux/x86_64 -t chaosbot .