Change get_url typing to Optional[str]

This commit is contained in:
Groosha 2021-05-18 22:11:12 +03:00
parent 4b1188669c
commit 56c5c20241

View file

@ -1714,7 +1714,7 @@ class Message(TelegramObject):
reply_markup=reply_markup,
)
def get_url(self, force_private: bool = False) -> str:
def get_url(self, force_private: bool = False) -> Optional[str]:
"""
Returns message URL. Cannot be used in private (one-to-one) chats.
If chat has a username, returns URL like https://t.me/username/message_id