Replace deprecated 'is_private' method

This commit is contained in:
Dmitriy 2021-04-02 02:57:34 +03:00 committed by GitHub
parent 79c59b34f9
commit e851840c91
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -267,7 +267,8 @@ 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/"
if self.chat.username: