Skip to content

Latest commit

 

History

History
18 lines (17 loc) · 959 Bytes

README.md

File metadata and controls

18 lines (17 loc) · 959 Bytes

athene-vaalibot

This simple Telegram bot checks the Flarum based election forum of Athene (the guild/student association of Information Networks in Aalto University) for new discussions posted under topics regarding nomination of candidates and sends updates to Telegram.

Setup

git clone git@github.com:samporapeli/athene-vaalibot.git
cd athene-vaalibot
python3 -m venv venv         # or virtualenv -p python3 venv
source venv/bin/activate
pip install -r requirements.txt
# "legacy" bot (sends messages to multiple chats)
export VAALI_BOT_TOKEN=your_telegram_token_here
./bot.py
# channel bot (only sends message to one chat/channel)
VAALI_BOT_TOKEN=your_telegram_token_here VAALI_BOT_CHAT_ID=channel_chat_id_here ./channel_bot.py

Channel bot exits after going through the candidate lists and sending updates. Scheduled runs e.g. using cron are the recommended way to run the channel bot.