add condition when call.message is none

This commit is contained in:
abrikk 2022-05-18 22:41:23 +05:00
parent d41074972f
commit 3fbf29e136

View file

@ -732,7 +732,7 @@ class ChatTypeFilter(BoundFilter):
if isinstance(obj, Message):
chat_type = obj.chat.type
elif isinstance(obj, CallbackQuery):
chat_type = obj.message.chat.type
chat_type = obj.message.chat.type if obj.message else None
elif isinstance(obj, ChatMemberUpdated):
chat_type = obj.chat.type
elif isinstance(obj, InlineQuery):