Skip to content

Commit

Permalink
fix bugs in run.py and constants.py
Browse files Browse the repository at this point in the history
  • Loading branch information
MahtabRanjbar committed Dec 19, 2021
1 parent 0e0344a commit a47ab3e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
)

keyboards = SimpleNamespace(
main=create_keyboard(keys.settings),
main=create_keyboard(keys.settings, keys.exit),
)
6 changes: 2 additions & 4 deletions src/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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()

0 comments on commit a47ab3e

Please sign in to comment.