mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
Fix group and supergroup issues
This commit is contained in:
parent
419bc5878f
commit
d14064a84d
@ -307,7 +307,7 @@ class StateFilter(AdvancedCustomFilter):
|
||||
elif isinstance(text, State):
|
||||
text = text.name
|
||||
|
||||
if message.chat.type == 'group':
|
||||
if message.chat.type in ['group', 'supergroup']:
|
||||
group_state = await self.bot.current_states.get_state(user_id, chat_id)
|
||||
if group_state == text:
|
||||
return True
|
||||
|
@ -315,7 +315,7 @@ class StateFilter(AdvancedCustomFilter):
|
||||
elif isinstance(text, State):
|
||||
text = text.name
|
||||
|
||||
if message.chat.type == 'group':
|
||||
if message.chat.type in ['group', 'supergroup']:
|
||||
group_state = self.bot.current_states.get_state(user_id, chat_id)
|
||||
if group_state == text:
|
||||
return True
|
||||
|
Loading…
Reference in New Issue
Block a user