This GitHub repository is simply a discord bot (to be hosted) coded in python.
It checks with a given ICal link if there are any events coming up.
- Launch the bot a first time, it will create a
config.json
file. - Fill the
config.json
file with your bot token and the ICal link you want to check. - Launch the bot a second time and that's it!
- Python 3.9 or higher
- discord.py 2.0 or higher
- icalendar
- pytz
- requests
- json
- asyncio
- sys
- datetime
- os
Here is a command to install all the prerequisites:
pip install discord.py icalendar pytz requests json asyncio sys datetime os
And here is a command to update all the prerequisites:
pip install -U discord.py icalendar pytz requests json asyncio sys datetime os
python main.py
Make a service file in /etc/systemd/system/
with the following content:
[Unit]
Description=ICal-checker
After=network.target
[Service]
ExecStart=/usr/bin/python3 /path/to/main.py
WorkingDirectory=/path/to/main.py
Restart=always
User=your_user
[Install]
WantedBy=multi-user.target
Reload the daemon:
sudo systemctl daemon-reload
Start the service:
sudo systemctl start ical-checker.service
Enable the service:
sudo systemctl enable ical-checker.service
sudo systemctl stop ical-checker.service
sudo systemctl restart ical-checker.service
sudo systemctl status ical-checker.service
screen -S ical-checker
python main.py
Ctrl + A + D
screen -r ical-checker
screen -X -S ical-checker quit
Ctrl + C
And that's it! You can now use the bot!
You can contribute by forking the repository and making a pull request.