From 102fe3a8fb7b87fa0bf5002e7ab99a111a101e3c Mon Sep 17 00:00:00 2001 From: _run Date: Wed, 23 Feb 2022 13:07:25 +0500 Subject: [PATCH] Update asyncio_filters.py --- telebot/asyncio_filters.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/telebot/asyncio_filters.py b/telebot/asyncio_filters.py index 232870a..6c1fc4b 100644 --- a/telebot/asyncio_filters.py +++ b/telebot/asyncio_filters.py @@ -278,7 +278,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