class InlineKeyboardButton
This object represents one button of an inline keyboard.¶ ↑
You must use exactly one of the optional fields.
Public Instance Methods
Optional
. Data to be sent in a CallbackQuery
to the bot when button is pressed, 1-64 bytes.
# File lib/objects/inlinekeyboardbutton.rb, line 30 def callback_data @button.callback_data end
Optional
. Description of the game that will be launched when the user presses the button.
# File lib/objects/inlinekeyboardbutton.rb, line 51 def callback_game @button.callback_game end
Optional
. An HTTP URL used to automatically authorize the user. Can be used as a replacement for the Telegram
Login Widget.
# File lib/objects/inlinekeyboardbutton.rb, line 24 def login_url @button.login_url end
Optional
. Specify True, to send a Pay button.
# File lib/objects/inlinekeyboardbutton.rb, line 56 def pay? @button.pay end
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. Can be empty, in which case just the bot's username will be inserted.
# File lib/objects/inlinekeyboardbutton.rb, line 38 def switch_inline_query @button.switch_inline_query end
Optional.
If set, pressing the button will insert the bot's username and the specified inline query in the current chat's input field. Can be empty, in which case only the bot's username will be inserted.
# File lib/objects/inlinekeyboardbutton.rb, line 45 def switch_inline_query_current_chat @button.switch_inline_query_current_chat end
Label text on the button.
# File lib/objects/inlinekeyboardbutton.rb, line 12 def text @button.text end
Optional
. HTTP or tg:// url to be opened when button is pressed
# File lib/objects/inlinekeyboardbutton.rb, line 17 def url @button.url end