From a47ab3e92201f0e6e4063388046e663f3b66798e Mon Sep 17 00:00:00 2001 From: MahtabRanjbar Date: Mon, 20 Dec 2021 01:20:49 +0330 Subject: [PATCH] fix bugs in run.py and constants.py --- src/constants.py | 2 +- src/run.py | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) 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() +