1
0
mirror of https://github.com/eternnoir/pyTelegramBotAPI.git synced 2023-08-10 21:12:57 +03:00

Critical fix

This commit is contained in:
_run
2021-10-01 23:29:59 +05:00
parent f337abe06e
commit bf8736e17e
2 changed files with 19 additions and 2 deletions

View File

@ -159,8 +159,9 @@ class StateFilter(AdvancedCustomFilter):
def check(self, message, text):
if self.bot.current_states.current_state(message.from_user.id) is False:return False
elif '*' in text:return True
return self.bot.current_states.current_state(message.from_user.id) in text
elif text == '*':return True
elif type(text) is list:return self.bot.current_states.current_state(message.from_user.id) in text
return self.bot.current_states.current_state(message.from_user.id) == text
class IsDigitFilter(SimpleCustomFilter):
"""