🇺🇦
Повністю настроюваний, модульний, простий в обслуговуванні, простий у масштабуванні 🐸
Пакет | Посилання |
---|---|
APScheduler | https://pypi.org/project/APScheduler/ |
Requests | https://pypi.org/project/requests/ |
Pyrogram | https://pypi.org/project/Pyrogram/ |
TgCrypto | https://pypi.org/project/TgCrypto/ |
- Формування та управління чергою
- Відправка розкладу (Розклад береться із сайту schedule.kpi.ua)
- Нагадування про початок пари (За наявності, відправляється посилання на пару)
- Управління локальною базою даних із інтерфейсу бота
- Для початку тобі потрібно створити власного бота. Для цього напиши офіційному боту (https://t.me/BotFather), за допомогою команди
/newbot
і наявних інструкцій ти створиш власного. - Запиши унікальний токен (Має вигляд 1234567:AAABBBCCCDDDEEEFFF)
- Створи унікальний
.session
файл твого бота (Детальніше)
- Тепер потрібно налаштувати основні параметри бота. Для цього, в папці
config/app.py
зміни ім'я сесії на своє. - В папці
config/config.py
зміни усі параметри
Примітка:
admin_user_id - ID користувача з підвищеними правами (Зможе видаляти чергу, навіть якщо він її не створив, управляти базою даних і т.п.)
chat_id - ID чату, в якому буде працювати бот
bot_username - Username бота (без символу @)
group_name - Назва групи (Наприклад: XX-11) - Завантаж усі файли собі на сервер
- Встанови необхідні пакети
- Запусти бота:
python3 main.py
- Queue - Формування черги
- Reminder - Нагадування про початок пари
- Database - Управління базою даних
- Timetable - Відправка розкладу
- Tools - Інструменти
Черги
/create <назва черги>
- створити чергу/delete <назва черги>
- видалити чергу/join <назва черги>
- записатись у чергу/leave <назва черги>
- вийти з черги/check
- перевірити наявні черги/pass <кількість людей> <назва черги>
- пропустити людей в черзі/reset
Розклад
/week
- Розклад на цей тиждень/nextweek
- Розклад на наступний тиждень/today
- Розклад на сьогодні/tomorrow
- Розклад на завтра
Управління базою даних
/setup_db
- Налаштувати базу даних/reset_db
- Очистити базу даних/show_db
- Показати вміст бази даних/editlink <ID пари> <нове посилання>
- Змінити посилання на пару/ids
- Отримати ID всіх пар
Інструменти
/ping
- Пінг/chat_id
- Отримати ID чату/user_id
- Показати ID користувача, який відправив цю команду/user_id у відповідь на повідомлення
- Показати ID користувача, на якого відповіли
🇺🇸
Fully customizable, Modular, Easy-to-maintain, Easy-to-scale 🐸
Package | Link |
---|---|
APScheduler | https://pypi.org/project/APScheduler/ |
Requests | https://pypi.org/project/requests/ |
Pyrogram | https://pypi.org/project/Pyrogram/ |
TgCrypto | https://pypi.org/project/TgCrypto/ |
- Queue formation and management
- Sending the schedule (The schedule is taken from the website schedule.kpi.ua)
- Reminder about the start of the lesson (If available, a link to the lesson is sent)
- Local database management from the bot interface
- Firstly you need to create your own bot. To do this, write to the official bot (https://t.me/BotFather), using the command
/newbot
and the available instructions, you will create your own. - Write down the unique token (It looks like 1234567:AAABBBCCCDDDEEEFFF)
- Create a unique
.session
file of your bot (Details)
- Now you need to configure the basic parameters of the bot. To do this, change the session name to your own in the
config/app.py
folder. - Change all parameters in the
config/config.py
folder
Note:
admin_user_id - ID of a user with elevated rights (Can delete a queue even if he did not create it, manage the database, etc.)
chat_id - ID of the chat in which the bot will work
bot_username - Username of the bot (without the @ symbol)
group_name - Group name (For example: XX-11) - Upload all files to your server
- Install required packages
- Run the bot:
python3 main.py
- Queue - Queue formation
- Reminder - Reminder about the start of the lesson
- Database - Database management
- Timetable - Sending the schedule
- Tools - Tools
Queue
/create <queue name>
- create a queue/delete <queue name>
- delete the queue/join <queue name>
- join the queue/leave <queue name>
- leave the queue/check
- check available queues/pass <number of people> <queue name>
- skip people in the queue/reset
Schedule
/week
- Schedule for this week/nextweek
- Schedule for the next week/today
- Schedule for today/tomorrow
- Schedule for tomorrow
Database Management
/setup_db
- Set up the database/reset_db
- Clear the database/show_db
- Show the content of the database/editlink <lesson ID> <new link>
- Change the lesson link/ids
- Get IDs of all lessons
Tools
/ping
- Ping/chat_id
- Get chat ID/user_id
- Show the ID of the user who sent this command/user_id in response to the message
- Show the ID of the user who was answered