Total Complexity | 0 |
Total Lines | 35 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | # -*- coding:utf-8 -*- |
||
2 | # pylint: disable=C0103, C0413 |
||
3 | |||
4 | """ |
||
5 | Initializing telegram bot |
||
6 | """ |
||
7 | import os |
||
8 | from os import environ |
||
9 | |||
10 | from telebot import types |
||
11 | from telebot.async_telebot import AsyncTeleBot |
||
12 | |||
13 | EN, RU = "en", "ru" |
||
14 | DEFAULT_PARSE_MODE = "HTML" |
||
15 | MESSAGE_NOT_FOUND = "Sorry, but nothing was found for <b>%s</b>." |
||
16 | MESSAGE_SPECIFY_LOGLAN_WORD = ( |
||
17 | "You need to specify the Loglan word you would like to find." |
||
18 | ) |
||
19 | MESSAGE_SPECIFY_ENGLISH_WORD = ( |
||
20 | "You need to specify the English word you would like to find." |
||
21 | ) |
||
22 | |||
23 | MIN_NUMBER_OF_BUTTONS = 50 |
||
24 | TOKEN = environ.get("TELEGRAM_BOT_TOKEN") |
||
25 | ADMIN = int(environ.get("TELEGRAM_ADMIN_ID")) |
||
26 | DEFAULT_STYLE = os.getenv("DEFAULT_STYLE", "ultra") |
||
27 | SEPARATOR = "@" |
||
28 | |||
29 | cbq = types.CallbackQuery |
||
30 | msg = types.Message |
||
31 | |||
32 | bot = AsyncTeleBot(TOKEN, parse_mode=DEFAULT_PARSE_MODE) |
||
33 | |||
34 | from app.bot.telegram import processor |
||
35 |