public static class InlineKeyboardButton.InlineKeyboardButtonBuilder extends Object
| Modifier and Type | Method and Description |
|---|---|
InlineKeyboardButton |
build()
Builds the InlineKeyboardButton object
|
InlineKeyboardButton.InlineKeyboardButtonBuilder |
callbackData(String callbackData)
*Optional*
Sets the data to be sent in a callback query to the bot when button is pressed, 1-64 bytes
|
InlineKeyboardButton.InlineKeyboardButtonBuilder |
callbackGame(CallbackGame callbackGame)
*Optional*
Sets the CallbackGame object that will be sent with this button.
|
InlineKeyboardButton.InlineKeyboardButtonBuilder |
switchInlineQuery(String switchInlineQuery)
*Optional*
Sets the inline query switch text.
|
InlineKeyboardButton.InlineKeyboardButtonBuilder |
switchInlineQueryCurrentChat(String switchInlineQueryCurrentChat)
*Optional*
If set, pressing the button will insert the bot‘s username and the specified inline query in the current
chat's input field.
|
InlineKeyboardButton.InlineKeyboardButtonBuilder |
text(String text)
*Required*
Sets the text that will be displayed on this button
|
InlineKeyboardButton.InlineKeyboardButtonBuilder |
url(String url)
*Optional*
Sets the HTTP url to be opened when button is pressed
|
public InlineKeyboardButton.InlineKeyboardButtonBuilder text(String text)
text - The text that will be displayed on this buttonpublic InlineKeyboardButton.InlineKeyboardButtonBuilder url(String url)
url - The HTTP url to be opened when button is pressedpublic InlineKeyboardButton.InlineKeyboardButtonBuilder callbackData(String callbackData)
callbackData - The data to be sent in a callbackquery to the bot when button is pressed, 1-64 bytespublic InlineKeyboardButton.InlineKeyboardButtonBuilder switchInlineQuery(String switchInlineQuery)
switchInlineQuery - The inline query switch textpublic InlineKeyboardButton.InlineKeyboardButtonBuilder switchInlineQueryCurrentChat(String switchInlineQueryCurrentChat)
switchInlineQueryCurrentChat - The parameters you want to be added after the bots username in the inline
query. Can be an empty string if you only want the bots username to be
inserted.public InlineKeyboardButton.InlineKeyboardButtonBuilder callbackGame(CallbackGame callbackGame)
callbackGame - The inline query switch textpublic InlineKeyboardButton build()
Copyright © 2017. All rights reserved.