Home

Awesome

Каист Бот

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:

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

Design

All the stuff was drawn using Pixelmator Pro.

kaishnik_bot poster