Skip to content

Commit ad23717

Browse files
author
Pietro Albini
committed
Fix wrong handling of non-text messages
This happened only when there were commands registered, and a non-text message was sent to the bot. Regression introduced in 350a78a.
1 parent df28519 commit ad23717

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

botogram/hooks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def _after_init(self, args):
3939

4040
def call(self, bot, update):
4141
"""Call the hook"""
42-
if self._only_texts and update.message is None:
42+
if self._only_texts and update.message.text is None:
4343
return
4444
return self._call(bot, update)
4545

0 commit comments

Comments
 (0)