Update client/src/telethon/_impl/client/events/queries.py

This commit is contained in:
Lonami 2023-11-12 15:20:38 +01:00 committed by GitHub
parent 51c2db90c4
commit 69e741f2cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -49,8 +49,9 @@ class ButtonCallback(Event):
@property
def chat(self) -> Optional[Chat]:
"""
The :term:`chat` when the message was sent.
Only available if the event was triggered by a button under a usual message, not an inline one.
The :term:`chat` where the button was clicked.
This will be :data:`None` if the message with the button was sent from a user's inline query.
"""
if isinstance(self._raw, types.UpdateInlineBotCallbackQuery):
return None