You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit d709b39
Browse filesBrowse the repository at this point in the historyBrowse files
class KeyboardButton(Dictionaryable, JsonSerializable):
3141
3154
"""
3142
3155
This object represents one button of the reply keyboard. At most one of the fields other than text, icon_custom_emoji_id, and style must be used to specify the type of the button. For simple text buttons, String can be used instead of this object to specify the button text.
@@ -3353,6 +3366,8 @@ def to_dict(self) -> dict:
3353
3366
data = {
3354
3367
'inline_keyboard': [[button.to_dict() for button in row] for row in self.inline_keyboard],
3355
3368
}
3369
+
if self.force_reply is not None:
3370
+
data['force_reply'] = self.force_reply
3356
3371
return data
3357
3372
3358
3373
@property
@@ -3361,8 +3376,6 @@ def keyboard(self):
3361
3376
return self.inline_keyboard
3362
3377
3363
3378
3364
-
3365
-
3366
3379
class InlineKeyboardButton(Dictionaryable, JsonSerializable, JsonDeserializable):
3367
3380
"""
3368
3381
This object represents one button of an inline keyboard. Exactly one of the fields other than text, icon_custom_emoji_id, and style must be used to specify the type of the button.
@@ -3393,8 +3406,7 @@ class InlineKeyboardButton(Dictionaryable, JsonSerializable, JsonDeserializable)
3393
3406
:param switch_inline_query: Optional. If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in the input field. May be empty, in which case just the bot's username will be inserted. Not supported for messages sent in channel direct messages chats and on behalf of a business account.
3394
3407
:type switch_inline_query: :obj:`str`
3395
3408
3396
-
:param switch_inline_query_current_chat: Optional. If set, pressing the button will insert the bot's username and the specified inline query in the current chat's input field. May be empty, in which case only the bot's username will be inserted.
3397
-
This offers a quick way for the user to open your bot in inline mode in the same chat - good for selecting something from multiple options. Not supported in channels and for messages sent in channel direct messages chats and on behalf of a business account.
3409
+
:param switch_inline_query_current_chat: Optional. If set, pressing the button will insert the bot's username and the specified inline query in the current chat's input field. May be empty, in which case only the bot's username will be inserted. This offers a quick way for the user to open your bot in inline mode in the same chat - good for selecting something from multiple options. Not supported in channels and for messages sent in channel direct messages chats and on behalf of a business account.
:param switch_inline_query_chosen_chat: Optional. If set, pressing the button will prompt the user to select one of their chats of the specified type, open that chat and insert the bot's username and the specified inline query in the input field. Not supported for messages sent in channel direct messages chats and on behalf of a business account.
0 commit comments