diff --git a/telebot/custom_filters.py b/telebot/custom_filters.py index e6a1531..0305673 100644 --- a/telebot/custom_filters.py +++ b/telebot/custom_filters.py @@ -282,7 +282,10 @@ class StateFilter(AdvancedCustomFilter): if text == '*': return True if isinstance(text, list): - new_text = [i.name for i in text] + new_text = [] + for i in text: + if isclass(i): i = i.name + new_text.append(i) text = new_text elif isinstance(text, object): text = text.name