Skip to content

telegram & vk bot for students of KNRTU-KAI to make their daily routine more pleasant

License

Notifications You must be signed in to change notification settings

airatk/kaishnik-bot

Repository files navigation

Каист Бот

telegram & vk bot for students of KNRTU-KAI to make their daily routine more pleasant

Stack

On Telegram

On Telegram

On VK

On VK

Reason

The bot might be considered as kai.ru wrapper. Official mobile-unfriendly ugly inconvenient website had to be replaced by something usable. Here the @kaishnik_bot comes in.

Setup

Since the university is located in Kazan which is the Moscow time zone, the time zone should be set to Europe/Moscow.

Data

There should be data/ folder in the root directory of the bot. It should contain keys non-extension file with tokens & keys accessed using config module.

Launch setup

The requirements.txt file is included to the repository. So, use pip3 install -r requirements.txt to get all the necessities. Use python3 ./ to launch.

Architecture

The bot is stored in project root directory folder called bot/. The bot/ contains 3 subdirectories:

  • platforms/ - implementation of the bot on a variety of social networks.
  • models/ - classes of peewee models of data stored in PostgreSQL database.
  • utilities/ - additional code that takes student data from the university servers, connects the bot to the database, and so on.

Each command has its own directory:

*command_name*/
├── __init__.py
├── *commands_file*.py
├── *commands_file*.py
├── guard.py
└── utilities/
    ├── keyboards.py
    ├── helpers.py
    ├── constants.py
    └── types.py

The structure is essential meanwhile all the noted files are optional. One-file commands are exceptions, and are located in bot/platforms/<platform>/commands/others/ directory. bot/platforms/<platform>/commands/schedule/ directory is also an exception, and may be considered as a super-command which consists of 3 similar, but separate commands.

Other stuff

  • update-logs/ folder contains notes which were sent to users as update announcements.
  • design/ folder contains .pxd & .png files with all the bot associated design.

Design

All the stuff was drawn using Pixelmator Pro.

kaishnik_bot poster

About

telegram & vk bot for students of KNRTU-KAI to make their daily routine more pleasant

Resources

License

Stars

Watchers

Forks

Languages