mirror of
https://github.com/miloszowi/everyone-mention-telegram-bot.git
synced 2025-10-10 09:05:57 +00:00
fixed NoneType upon telegram message edit
This commit is contained in:
@@ -35,7 +35,7 @@ class InboundMessage:
|
||||
GroupNameValidator.validate(group_name)
|
||||
|
||||
# done upon resolving a message handler action
|
||||
if '@' in update.message.text and update.message.text[0] != '/':
|
||||
if update.message and '@' in update.message.text and update.message.text[0] != '/':
|
||||
searched_message_part = [part for part in update.message.text.split(' ') if '@' in part][0]
|
||||
group_name = re.sub(r'\W+', '', searched_message_part).lower()
|
||||
|
||||
|
Reference in New Issue
Block a user