Replace deprecated 'is_private' method (#553)

This commit is contained in:
Dmitriy 2021-04-12 10:24:13 +03:00 committed by GitHub
parent 69e4ecc606
commit df294e579f
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: