Passed
Push — master ( 653794...1bc565 )
by torrua
01:28
created

app.telegram_bot.bot   A

Complexity

Total Complexity 0

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 22
dl 0
loc 35
rs 10
c 0
b 0
f 0
wmc 0
1
# -*- coding:utf-8 -*-
2
# pylint: disable=C0103, C0413
3
4
"""
5
Initializing telegram 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
APP_SITE = environ.get("APP_SITE")
24
ADMIN = int(environ.get("TELEGRAM_ADMIN_ID"))
25
DEFAULT_LANGUAGE = os.getenv("DEFAULT_LANGUAGE", EN)
26
DEFAULT_STYLE = os.getenv("DEFAULT_STYLE", "ultra")
27
SEPARATOR = "@"
28
29
cbq = types.CallbackQuery
30
msg = types.Message
31
32
bot = TeleBot(TOKEN, parse_mode=DEFAULT_PARSE_MODE)
33
34
from app.telegram_bot.bot import processor
35
36