Passed
Push — master ( 449b8d...1f3828 )
by torrua
01:12
created

app.bot.telegram   A

Complexity

Total Complexity 0

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 0
eloc 20
dl 0
loc 33
rs 10
c 0
b 0
f 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
from telebot import TeleBot, types
10
11
EN, RU = "en", "ru"
12
DEFAULT_PARSE_MODE = "HTML"
13
MESSAGE_NOT_FOUND = "Sorry, but nothing was found for <b>%s</b>."
14
MESSAGE_SPECIFY_LOGLAN_WORD = (
15
    "You need to specify the Loglan word you would like to find."
16
)
17
MESSAGE_SPECIFY_ENGLISH_WORD = (
18
    "You need to specify the English word you would like to find."
19
)
20
21
MIN_NUMBER_OF_BUTTONS = 50
22
TOKEN = environ.get("TELEGRAM_BOT_TOKEN")
23
ADMIN = int(environ.get("TELEGRAM_ADMIN_ID"))
24
DEFAULT_STYLE = os.getenv("DEFAULT_STYLE", "ultra")
25
SEPARATOR = "@"
26
27
cbq = types.CallbackQuery
28
msg = types.Message
29
30
bot = TeleBot(TOKEN, parse_mode=DEFAULT_PARSE_MODE)
31
32
from app.bot.telegram import processor
33