Fixed usage of deprecated is_private function (#421)

Co-authored-by: Alex Root Junior <jroot.junior@gmail.com>
This commit is contained in:
lyteloli 2020-09-13 22:08:55 +03:00 committed by GitHub
parent a936465f42
commit 51547f9745
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 4 deletions

View file

@ -236,9 +236,8 @@ class Message(base.TelegramObject):
:return: str
"""
if ChatType.is_private(self.chat):
raise TypeError("Invalid chat type!")
if self.chat.type == ChatType.PRIVATE:
raise TypeError('Invalid chat type
url = "https://t.me/"
if self.chat.username:
# Generates public link