Skip to content

Commit

Permalink
added return simplification additional to last commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Bob-six committed Oct 17, 2024
1 parent 5df648f commit a9a43d0
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions telegram/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,7 @@ def handle_callback_query(self, call: types.CallbackQuery):

instance = self.callback_handlers.get(cmd_parts[0])

if not instance:
return None

return instance.handler(call)
return None if not instance else instance.handler(call)

def on_telegram_message(self, message: types.Message):
"""
Expand Down

0 comments on commit a9a43d0

Please sign in to comment.