Discord bot enhancing WRSS WIET & WI workflow
Tested for python 3.12
- build the image using
docker build -t wrss-bot . - copy
example.docker-compose.ymltodocker-compose.ymland set environment variables - run container using
docker compose up -d
- install
direnv - create python venv
- install packages from
requirements.txt - copy
.sample-envrcto.envrcand set environment variables - run
direnv allowto activate.envrc - run bot using
python wrss-bot.py
The bot requires three JSON files in the project root:
role_settings.jsonembed_settings.jsonseen_settings.json
If they do not exist, the bot will create empty ones, but you should seed them with a basic structure to avoid errors in /embed commands.
Warning
Ensure embed_settings file contain at least the default structure below before first use.
{
"default": {
"title": "",
"description": "",
"url": "",
"color": "2fc8b6",
"footer": {
"text": "",
"icon_url": ""
},
"image": "",
"thumbnail": "",
"author": {
"name": "",
"url": "",
"icon_url": ""
},
"fields": [
{
"name": "",
"value": "",
"inline": false
}
],
"buttons": [
{
"label": "",
"emoji": "",
"style": "link",
"url": "",
"embed": {}
}
]
}
}-
Seen Reactions
Configurableseenreaction per channel via/seensettingsin order to easily show that user has read the message. -
Thread Creation
Auto-opens a thread when a message starts with[thread name]. -
Doodle Hub
Forwards detected Doodle links to a dedicated hub channel with context and reference to original message. Ensures all doodles links are in one place so that they could be filled easily. Adds achecboxemoji reaction to all forwarded doodles to allow easy marking as completed. Supported doodle links can be specified inexample.docker-compose.yml. -
Reaction Summary
The first message in every thread shows all reactions on the source message. Made because on mobile devices it was impossible to see reactions to original post while reading thread. -
Continued Discussion
[cd]
Addsseenreaction to posts with[cd]inside a thread. -
Polls
Auto-adds reaction options based on message content. Syntax:
> - emote0 option-0-description
> - emote1 option-1-description
- All-Message Notification
Automatically pings users with a specified role in every thread for full visibility and receiving notifications.
All commands below are registered only on the server where the bot is installed.
Configure seen reaction behavior per channel.
- channel: TextChannel (optional)
- mode:
Always/ThreadsOnly/Off(optional) - scope:
current/all(default:all) - to view the current configuration
Example:
/seensettings mode:Off channel:general
Note
The command above will disable adding reactions to any message in the general channel.
Manage role groups via several subcommands:
-
/role list
Lists all configured role groups. -
/role create
<group_name>
Creates a new role group. -
/role add
<group_name><@role><emoji>[description]
Adds a role to a group with a button emoji. -
/role remove
<group_name><emoji>
Removes a role from a group. -
/role show
<group_name>
Sends an embed with buttons to assign or remove roles.
Save and send rich embeds via configuration:
-
/embed list
Lists all saved embed keys. -
/embed save
<embed_key>
Opens a modal to build and save a new embed underembed_key. -
/embed send
<embed_key>
Sends the saved embed to the channel (autocomplete enabled).
Interactive modal for graphic design orders as a template. Collects:
Event NameWhatDimensionsDeadlineTheme & Additional Info(optional)
On submit, it posts an embed and creates a thread.
You can pass an optional edytuj parameter to update an existing order:
/zamowieniegrafik edit:<message_id>
- Opens the modal pre-filled with data from the specified embed message - you don't have to fill in all the information again.
- On submit, edits the original embed (fix typos, update deadline, etc.)