mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
Update asyncio_filters.py
This commit is contained in:
parent
71d3ec8b42
commit
e3a4fdff9a
@ -420,7 +420,7 @@ class StateFilter(AdvancedCustomFilter):
|
|||||||
text = text.name
|
text = text.name
|
||||||
|
|
||||||
if message.chat.type in ['group', 'supergroup']:
|
if message.chat.type in ['group', 'supergroup']:
|
||||||
group_state = await self.bot.current_states.get_state(user_id, chat_id)
|
group_state = await self.bot.current_states.get_state(chat_id, user_id)
|
||||||
if group_state == text:
|
if group_state == text:
|
||||||
return True
|
return True
|
||||||
elif type(text) is list and group_state in text:
|
elif type(text) is list and group_state in text:
|
||||||
@ -428,7 +428,7 @@ class StateFilter(AdvancedCustomFilter):
|
|||||||
|
|
||||||
|
|
||||||
else:
|
else:
|
||||||
user_state = await self.bot.current_states.get_state(user_id, chat_id)
|
user_state = await self.bot.current_states.get_state(chat_id, user_id)
|
||||||
if user_state == text:
|
if user_state == text:
|
||||||
return True
|
return True
|
||||||
elif type(text) is list and user_state in text:
|
elif type(text) is list and user_state in text:
|
||||||
|
Loading…
Reference in New Issue
Block a user