Bot functions:
- Creating rehearsals, send notification to chats and channels
- Creating lectors with profiles (it can be useful for creating events)
- Creating lecturers based on created lectors
- Reminding about empty description for lecturers (we had a problem when we prepare an event, we forget to ask descriptions before, so collect all unrgently)
- Creating events and send notifications to chats and channels
How to use:
-
Install
docker(>=18.09.2) anddocker-compose(>1.25.0) -
Copy config file from
.env-sampleto.envfile -
Setup all needed environment variables:
3.1. REQUIRED VARIABLE: Admin account tg username in the
ADMIN_ACCOUNTenvironment variable (reqiured). Example (should be without@):ADMIN_ACCOUNT=my_username3.2. REQUIRED VARIABLE: Token for telegram bot in the
TG_TOKEN- you need to create new bot through @BotFather (command/newbot). Example:TG_TOKEN=566944285:AAHQ_GcpSKdGy_rrGrTnN9NtRcBcvBnP2KI3.3. REQUIRED VARIABLE:
MAIN_CHANNEL_USERNAME- general public channel for the branch. Example:MAIN_CHANNEL_USERNAME=@test15x43.4. REQUIRED VARIABLE:
ORG_CHANNEL_USERNAME- channel for lectors of the branch (internal). Here you can send notification of the next rehearsal. Example:ORG_CHANNEL_USERNAME=@test15x43.5. OPTIONAL VARIABLE:
ORG_CHAT_ID- internal chat for the branch (like flood chat). Here you can send notification of the next rehearsal. Example:ORG_CHAT_ID=-389484898This value you can get after adding bot to the chat (in the logs). There is no other way to get chat id in the Telegram
3.6. OPTIONAL VARIABLE:
GRAMMER_NAZI_CHAT_ID- chat for grammar-nazi. When you create a new lecture, you can send description of the lecture in the special editors chat for validation. Can be empty. Example:GRAMMER_NAZI_CHAT_ID=-3894848983.7. OPTIONAL VARIABLE:
DESIGNER_CHAT_ID- chat of designers. When you create an event, you can send all prepared information to the designers chat. You can find it in the event menu. Can be empty. Example:DESIGNER_CHAT_ID=-389484898 -
Run
make. It will create all needed docker containers, volumes and networks. You will see logs in output after starting