Discord Bot#

usage#

The bot is designed to be used in a Discord server. To add the bot to your server, you need to open the following link in your browser: <> and add the bot to your server. After the bot is added to your server and listed in members list with the information that he is playing Don’t Starve Together, you can start the games via commands.

Important

Currently there is no functionality to restrict the user group or the commands to a channel. You have to create this manually. For more information, please refer to Authorizations

functions#

This module contains the discord bot implementation with definitions for the bot and its commands. The bot is implemented using the discord.py library and provides a simple command to test the bot.

class src.discord_bot.DiscordBot(config)[source]#

DiscordBot class to create a discord bot with the given configuration. This is necessary because of a own implementation with user configuration and pydantic validation.

async start()[source]#

Function to start the bot with the given token from the configuration. This function is called in the main function to start the bot.

async on_ready()[source]#

Event function to print a message when the bot is online.

register_commands()[source]#

Function to register the commands for the bot. This function is called in the constructor to register the commands.

async init_reaction_tracker()[source]#

Function to initialize the reaction tracker before it starts.