-
Notifications
You must be signed in to change notification settings - Fork 6k
Description
RegexHandler does not check if update.effective_message.text exists.
Steps to reproduce
- Add a RegexHandler
- Run the bot
- Send a sticker
Expected behaviour
The handler should not capture the sticker
Actual behaviour
The handler capture the sticker and gives an error
Configuration
Does not matter
Version of Python, python-telegram-bot & dependencies:
python-telegram-bot 7.0.0
Logs
2017-07-26 14:02:47,301 - telegram.ext.dispatcher - ERROR - An uncaught error was raised while processing the update
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/telegram/ext/dispatcher.py", line 269, in process_update
if handler.check_update(update):
File "/usr/local/lib/python3.5/dist-packages/telegram/ext/regexhandler.py", line 150, in check_update
match = re.match(self.pattern, update.effective_message.text)
File "/usr/lib/python3.5/re.py", line 163, in match
return _compile(pattern, flags).match(string)
TypeError: expected string or bytes-like object