Skip to content

DanielPikilidis/DIT-Announcements

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DIT-Announcements

Sends new announcements from https://www.di.uoa.gr/announcements to discord

You can invite the bot or install it to host it yourself. (instructions below)
Invite link: https://discord.com/api/oauth2/authorize?client_id=881568952378073149&permissions=27664&scope=bot
The base of the bot can be used for sending other announcements / notifications as well by adding more cogs.

Installation

For any method you will need an api key from discord.

Local:

  1. Clone the repository
git clone https://github.com/DanielPikilidis/DIT-Announcements.git DitAnnouncements
cd DitAnnouncements
  1. Install required dependencies:

pip3 install -r requirements.txt

  1. Start the bot:

python3 bot.py

  1. A new directory named "data" is now created. Paste your api key in the config.txt file inside that directory.

  2. Start the bot again:

python3 bot.py

Docker:

  1. Clone the repository:
git clone https://github.com/DanielPikilidis/DIT-Announcements.git DitAnnouncements
cd DitAnnouncements
  1. Build the Docker image:

docker build -t dit_announcements .

  1. Create and start the container:

docker run -d -v $(pwd)/data:/data -v $(pwd)/logs:/logs --restart unless-stopped --name dit_announcements dit_announcements

  1. A new directory named "data" is now created. Paste your api key in the config.txt file inside that directory.

  2. Restart the container:

docker start dit_announcements