From e86ae25a628ba6ccfe39c83cd9586c77b7b7541c Mon Sep 17 00:00:00 2001 From: Pietu R Date: Sat, 28 Mar 2020 16:52:37 +0200 Subject: [PATCH] Update CallbackQuery docstrings (#1818) * mark chat_instance as required * change ordering and add bot --- AUTHORS.rst | 1 + telegram/callbackquery.py | 17 +++++++++-------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/AUTHORS.rst b/AUTHORS.rst index f0319f8c8..a467ff0cf 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -36,6 +36,7 @@ The following wonderful people contributed directly or indirectly to this projec - `Evan Haberecht `_ - `evgfilim1 `_ - `franciscod `_ +- `gamgi `_ - `Hugo Damer `_ - `ihoru `_ - `Jasmin Bom `_ diff --git a/telegram/callbackquery.py b/telegram/callbackquery.py index 0077e59b5..2e3483155 100644 --- a/telegram/callbackquery.py +++ b/telegram/callbackquery.py @@ -36,30 +36,31 @@ class CallbackQuery(TelegramObject): Attributes: id (:obj:`str`): Unique identifier for this query. from_user (:class:`telegram.User`): Sender. + chat_instance (:obj:`str`): Global identifier, uniquely corresponding to the chat to which + the message with the callback button was sent. message (:class:`telegram.Message`): Optional. Message with the callback button that originated the query. + data (:obj:`str`): Optional. Data associated with the callback button. inline_message_id (:obj:`str`): Optional. Identifier of the message sent via the bot in inline mode, that originated the query. - chat_instance (:obj:`str`): Optional. Global identifier, uniquely corresponding to the chat - to which the message with the callback button was sent. - data (:obj:`str`): Optional. Data associated with the callback button. game_short_name (:obj:`str`): Optional. Short name of a Game to be returned. + bot (:class:`telegram.Bot`, optional): The Bot to use for instance methods. Args: id (:obj:`str`): Unique identifier for this query. from_user (:class:`telegram.User`): Sender. + chat_instance (:obj:`str`): Global identifier, uniquely corresponding to the chat to which + the message with the callback button was sent. Useful for high scores in games. message (:class:`telegram.Message`, optional): Message with the callback button that originated the query. Note that message content and message date will not be available if the message is too old. - inline_message_id (:obj:`str`, optional): Identifier of the message sent via the bot in - inline mode, that originated the query. - chat_instance (:obj:`str`, optional): Global identifier, uniquely corresponding to the chat - to which the message with the callback button was sent. Useful for high scores in - games. data (:obj:`str`, optional): Data associated with the callback button. Be aware that a bad client can send arbitrary data in this field. + inline_message_id (:obj:`str`, optional): Identifier of the message sent via the bot in + inline mode, that originated the query. game_short_name (:obj:`str`, optional): Short name of a Game to be returned, serves as the unique identifier for the game + bot (:class:`telegram.Bot`, optional): The Bot to use for instance methods. Note: After the user presses an inline button, Telegram clients will display a progress bar