English | 繁體中文
A Discord Bot that automatically sends daily event countdown messages to a specified channel on a designated server and mentions a specific role.
Here are the required files for this Discord bot, along with descriptions for each file:
- bot.py
The main code for the bot in English. - date.json
Used to save data for all events, including event names and dates. - send.txt
Used to record the last time a notification was sent.
Before running the bot, please configure bot.py using the following steps:
- Fill in your Discord Bot's TOKEN in the
TOKEN. - Obtain the server ID and channel ID where you want to send messages. Fill in
GUILD_IDandCHANNEL_IDrespectively. - Enter the role name you want to mention in the
ROLE_NAME. - Set the message sending time. The default is every day at midnight. The four values from left to right represent hour, minute, second, and millisecond.
- Set the time interval for checking. The default is to check every 60 seconds whether it's time to send the message.
After configuration, run bot.py, and you can start using the bot!
- help
!help command
Inquire about the syntax of a specific command.
Example:!help add - test
!test
Test the bot's running status, if it's running correctly, it will returnAlive. - add
!add yyyy-mm-dd name
Add an event named "name".
Example:!add 2023-01-01 Birthday - delete
!delete name
Delete the event named "name".
Example:!delete Birthday - check
!check
Query the currently existing events.
