Fixed usage of deprecated is_private function

This commit is contained in:
lyteloli 2020-09-12 16:18:27 +03:00
parent cb0a898487
commit cd0f54ffc1
2 changed files with 2 additions and 2 deletions

View file

@ -656,7 +656,7 @@ class AdminFilter(Filter):
message = obj.message
else:
return False
if ChatType.is_private(message): # there is no admin in private chats
if message.chat.type == ChatType.PRIVATE: # there is no admin in private chats
return False
chat_ids = [message.chat.id]
else:

View file

@ -234,7 +234,7 @@ class Message(base.TelegramObject):
:return: str
"""
if ChatType.is_private(self.chat):
if self.chat.type == ChatType.PRIVATE:
raise TypeError('Invalid chat type!')
url = 'https://t.me/'