mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Fixed usage of deprecated is_private function
This commit is contained in:
parent
cb0a898487
commit
cd0f54ffc1
2 changed files with 2 additions and 2 deletions
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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/'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue