Last active
February 8, 2022 00:11
-
-
Save eternnoir/c147e5bb1496f83ad59db7f10372b290 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def _notify_command_handlers(self, handlers, new_messages): | |
for message in new_messages: | |
# if message has next step handler, dont exec command handlers | |
if (isinstance(message, types.CallbackQuery)) or \ | |
(isinstance(message, types.Message) and (message.chat.id not in self.message_subscribers_next_step)): | |
for message_handler in handlers: | |
if self._test_message_handler(message_handler, message): | |
self._exec_task(message_handler['function'], message) | |
break | |
def _notify_command_handlers(self, handlers, new_messages): | |
for message in new_messages: | |
# if message has next step handler, dont exec command handlers | |
if hasattr(message, chat) and message.chat and (message.chat.id not in self.message_subscribers_next_step): | |
for message_handler in handlers: | |
if self._test_message_handler(message_handler, message): | |
self._exec_task(message_handler['function'], message) | |
break |
Author
eternnoir
commented
Nov 14, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment