mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
Compare commits
No commits in common. "5ca92ff63717984ad008f59043bec5f5829935d4" and "01a6827542ed3a28138ee6618e0ff754a0c3f614" have entirely different histories.
5ca92ff637
...
01a6827542
@ -1,6 +1,5 @@
|
|||||||
from abc import ABC
|
from abc import ABC
|
||||||
from typing import Optional, Union
|
from typing import Optional, Union
|
||||||
from telebot.asyncio_handler_backends import State
|
|
||||||
|
|
||||||
from telebot import types
|
from telebot import types
|
||||||
|
|
||||||
@ -281,10 +280,10 @@ class StateFilter(AdvancedCustomFilter):
|
|||||||
if isinstance(text, list):
|
if isinstance(text, list):
|
||||||
new_text = []
|
new_text = []
|
||||||
for i in text:
|
for i in text:
|
||||||
if isinstance(i, State): i = i.name
|
if isclass(i): i = i.name
|
||||||
new_text.append(i)
|
new_text.append(i)
|
||||||
text = new_text
|
text = new_text
|
||||||
elif isinstance(text, State):
|
elif isinstance(text, object):
|
||||||
text = text.name
|
text = text.name
|
||||||
|
|
||||||
if message.chat.type == 'group':
|
if message.chat.type == 'group':
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
from abc import ABC
|
from abc import ABC
|
||||||
from typing import Optional, Union
|
from typing import Optional, Union
|
||||||
from telebot.handler_backends import State
|
|
||||||
|
|
||||||
from telebot import types
|
from telebot import types
|
||||||
|
|
||||||
@ -285,10 +284,10 @@ class StateFilter(AdvancedCustomFilter):
|
|||||||
if isinstance(text, list):
|
if isinstance(text, list):
|
||||||
new_text = []
|
new_text = []
|
||||||
for i in text:
|
for i in text:
|
||||||
if isinstance(i, State): i = i.name
|
if isclass(i): i = i.name
|
||||||
new_text.append(i)
|
new_text.append(i)
|
||||||
text = new_text
|
text = new_text
|
||||||
elif isinstance(text, State):
|
elif isinstance(text, object):
|
||||||
text = text.name
|
text = text.name
|
||||||
if message.chat.type == 'group':
|
if message.chat.type == 'group':
|
||||||
group_state = self.bot.current_states.get_state(message.chat.id, message.from_user.id)
|
group_state = self.bot.current_states.get_state(message.chat.id, message.from_user.id)
|
||||||
|
Loading…
Reference in New Issue
Block a user