attention-attention
is a friendly discord bot to remind you over discord that school is closing soon, wheverver you are, even outside of school! Just be in voice chat at the right time and you'll hear the intercom!
- Install Nix on your system and enable flake support.
- If you have
direnv
installed and set up, rundirenv allow
. Otherwise, enter thedevShell
usingnix develop
. - Hack away!
- Run the program using
python -m attention_attention
. - Build the python package using
nix build .#
.
- Install Nix on your system and enable flake support.
- Build the docker image using
nix build .#dockerImage.<system>
where<system>
is your target system likex86_64-linux
oraarch64-linux
. - Load the docker image into your local registry with
docker load < result
. - Tag/push/run the image like you normally would using the docker cli!
This bot implements a few interactions (a.k.a. "slash commands"):
Command | Description |
---|---|
/attention |
Prints an "Attention! Attention!" message |
/about |
Prints the bot version and invite link |
/sync |
Performs a full command tree sync -- This command is only available to the bot owner in the administrative guild |
There are a few environment variables that can control the runtime behaviour of the bot:
Environment Variable | Description |
---|---|
DISCORD_TOKEN |
The discord bot token to log in with |
LIBOPUS_PATH |
The path to the libopus library if it cannot be determined automatically by python |
DISCORD_COMMAND_SYNC |
Set this to any value to perform a full command tree sync on launch. This is required to perform the initial command tree sync when bootstrapping the bot. Once this is done, the /sync command in the administrative guid can be used for subsequent command tree syncs. |