LosKeeper / discord-calendar-bot

A Discord calendar bot

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

icon Discord Calendar Bot

Github Version Github License Github Last Commit Github Issues

Python Version Interactions.py Version

Author

This bot is used to display the events of the day, the next day or the week for a class. It can also display the events of a specific day and send every day a message with the events of the next day at a specific time.

🧾 Table of Contents

  1. πŸ”§ Setup
  2. πŸš€ Launch
  3. πŸ“ Commands
  4. 🐞 Bugs and TODO

πŸ”§ Setup

Many libraries are needed to make this bot work :

pip install -r requirements.txt

To configure the bot, you need to create configuration file name .env (you can use the .env.example file as a template) :

# URL of the calendar in ics format :
URL_1A=""
URL_2A_RIO=""
URL_2A_SDIA=""
URL_3A_RIO=""
URL_3A_SDIA=""

# Token of the bot :
TOKEN=""

# ID of the channel where the bot will send the messages :
CHANNEL_ID_1A=""
CHANNEL_ID_2A_RIO=""
CHANNEL_ID_2A_SDIA=""
CHANNEL_ID_3A_RIO=""
CHANNEL_ID_3A_SDIA=""

# Hour of the day when the bot will send the daily message (24h format):
HOUR=
MINUTE=

πŸš€ Launch

To launch the bot, you need to run the main.py file :

python3 main.py

πŸ“ Commands

The bot use the slash commands to interact with the user.

Command Description
/today <classe> Show the events of today for the class mentioned
/tomorrow <classe> Show the events of tomorrow for the class mentioned
/week <classe> Show the events of the week for the class mentioned
/day <YYYY-MM-DD> <classe> Show the events of a day for the class mentioned

In adition, the bot send a message at startup in the channels for each class concerning the events of the next day at the time specified in the .env file.

🐞 Bugs and TODO

  • Add test for the bot
  • Make code cleaner and more compact
  • Add logs

About

A Discord calendar bot

License:GNU General Public License v3.0


Languages

Language:Python 100.0%