diff --git a/src/constants.py b/src/constants.py index 06ff890..a345ad2 100644 --- a/src/constants.py +++ b/src/constants.py @@ -9,5 +9,5 @@ ) keyboards = SimpleNamespace( - main=create_keyboard(keys.settings), + main=create_keyboard(keys.settings, keys.exit), ) diff --git a/src/run.py b/src/run.py index f3c761e..16216b2 100644 --- a/src/run.py +++ b/src/run.py @@ -47,9 +47,7 @@ def echo(message): ) def send_message(self, chat_id, text, reply_markup=None, emojize=True): - """ - Send message to telegram bot. - """ + if emojize: text = emoji.emojize(text, use_aliases=True) @@ -59,4 +57,4 @@ def send_message(self, chat_id, text, reply_markup=None, emojize=True): if __name__ == '__main__': logger.info('Bot started') nashenas_bot = Bot(telebot=bot) - nashenas_bot.run() +