mirror of
https://github.com/miloszowi/everyone-mention-telegram-bot.git
synced 2025-05-20 09:14:07 +00:00
fixed commands with bot mention causing invalid group name
This commit is contained in:
parent
568ac15b5e
commit
48ceab008d
@ -35,7 +35,7 @@ class InboundMessage:
|
|||||||
GroupNameValidator.validate(group_name)
|
GroupNameValidator.validate(group_name)
|
||||||
|
|
||||||
# done upon resolving a message handler action
|
# done upon resolving a message handler action
|
||||||
if '@' in update.message.text:
|
if '@' in update.message.text and update.message.text[0] != '/':
|
||||||
searched_message_part = [part for part in update.message.text.split(' ') if '@' in part][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()
|
group_name = re.sub(r'\W+', '', searched_message_part).lower()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user