No description
Find a file
Nikita Aksenov f330e3dff3
Some checks failed
Deploy to Server / deploy (push) Has been cancelled
защиты и лекции поменял местами
2025-05-27 17:21:03 +03:00
.github/workflows remove debug ssh connection 2025-02-16 18:11:09 +03:00
.env.sample feat: add multiple env options to simplify personal deployments 2025-05-21 15:59:08 +03:00
.gitignore chore: add Dockerfile and compose.yml 2025-05-21 15:04:06 +03:00
compose.yml chore: add Dockerfile and compose.yml 2025-05-21 15:04:06 +03:00
Dockerfile chore: add Dockerfile and compose.yml 2025-05-21 15:04:06 +03:00
LICENSE README and LICENSE added 2025-01-20 14:20:39 +03:00
main.py защиты и лекции поменял местами 2025-05-27 17:21:03 +03:00
README.md Update README.md 2025-01-20 14:56:42 +03:00
requirements.txt chore: remove aiogram as a dependency 2025-05-21 16:39:48 +03:00

Deadline reminder bot for M3104 group @ ITMO University

This bot is made for Telegram and is used to fetch deadlines and upcoming tests from a specific URL and send them to a specified Telegram groupchat as a reminder. The time remaining is also displayed and updated every minute. After 1 day, the message is deleted as it is expected that the new message is sent.

Before first run

Before running this script, please ensure the following links and bot data is relevant for you and modify it at the top of the main.py file if needed:

# Modify the links and data below:
DEADLINES_URL = "https://m3104.nawinds.dev/api-deadlines"  # URL of the json file with deadlines (see file description below)
ADD_DEADLINE_LINK = "https://m3104.nawinds.dev/deadlines-editing-instructions/"  # URL of the webpage for adding a new deadline to the file (usually GitHub file editing page)
BOT_NAME = "Дединсайдер M3104"
BOT_USERNAME = "m3104_deadliner_bot"  # username of the bot as it appears in Telegram

Also add the following environment variables:

# Environment variables that should be available:
TOKEN = os.getenv("TOKEN")  # Bot token from t.me/botfather
MAIN_GROUP_ID = int(os.getenv("MAIN_GROUP_ID"))  # ID of the group the bot is expected to send deadlines to

How to run

This is a very simple script that can be run as a cron job. Just configure the crontab to start main.py every day at a specific time and it will fetch the deadlines and send them to the specified groupchat.