Class/Object

com.bot4s.telegram.models

InlineKeyboardButton

Related Docs: object InlineKeyboardButton | package models

Permalink

case class InlineKeyboardButton(text: String, callbackData: Option[String] = None, url: Option[String] = None, loginUrl: Option[LoginUrl] = None, switchInlineQuery: Option[String] = None, switchInlineQueryCurrentChat: Option[String] = None, callbackGame: Option[CallbackGame] = None, pay: Option[Boolean] = None) extends Product with Serializable

This object represents one button of an inline keyboard. You must use exactly one of the optional fields.

Notes: This offers an easy way for users to start using your bot in inline mode when they are currently in a private chat with it. Especially useful when combined with switch_pm... actions - in this case the user will be automatically returned to the chat they switched from, skipping the chat selection screen. This will only work in Telegram versions released after 9 April, 2016. Older clients will display unsupported message.

text

String Label text on the button

callbackData

String Optional Data to be sent in a callback query to the bot when button is pressed, 1-64 bytes

url

String Optional HTTP url to be opened when button is pressed

loginUrl

LoginUrl Optional. An HTTP URL used to automatically authorize the user. Can be used as a replacement for the Telegram Login Widget.

switchInlineQuery

String 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.

switchInlineQueryCurrentChat

String 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. 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.

callbackGame

CallbackGame Optional. Description of the game that will be launched when the user presses the button. NOTE: This type of button must always be the first button in the first row.

Linear Supertypes
Serializable, Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. InlineKeyboardButton
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new InlineKeyboardButton(text: String, callbackData: Option[String] = None, url: Option[String] = None, loginUrl: Option[LoginUrl] = None, switchInlineQuery: Option[String] = None, switchInlineQueryCurrentChat: Option[String] = None, callbackGame: Option[CallbackGame] = None, pay: Option[Boolean] = None)

    Permalink

    text

    String Label text on the button

    callbackData

    String Optional Data to be sent in a callback query to the bot when button is pressed, 1-64 bytes

    url

    String Optional HTTP url to be opened when button is pressed

    loginUrl

    LoginUrl Optional. An HTTP URL used to automatically authorize the user. Can be used as a replacement for the Telegram Login Widget.

    switchInlineQuery

    String 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.

    switchInlineQueryCurrentChat

    String 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. 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.

    callbackGame

    CallbackGame Optional. Description of the game that will be launched when the user presses the button. NOTE: This type of button must always be the first button in the first row.

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. val callbackData: Option[String]

    Permalink

    String Optional Data to be sent in a callback query to the bot when button is pressed, 1-64 bytes

  6. val callbackGame: Option[CallbackGame]

    Permalink

    CallbackGame Optional.

    CallbackGame Optional. Description of the game that will be launched when the user presses the button. NOTE: This type of button must always be the first button in the first row.

  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  9. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  11. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  12. val loginUrl: Option[LoginUrl]

    Permalink

    LoginUrl Optional.

    LoginUrl Optional. An HTTP URL used to automatically authorize the user. Can be used as a replacement for the Telegram Login Widget.

  13. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  14. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  15. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  16. val pay: Option[Boolean]

    Permalink
  17. val switchInlineQuery: Option[String]

    Permalink

    String 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.

    String 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.

  18. val switchInlineQueryCurrentChat: Option[String]

    Permalink

    String Optional.

    String 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. 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.

  19. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  20. val text: String

    Permalink

    String Label text on the button

  21. val url: Option[String]

    Permalink

    String Optional HTTP url to be opened when button is pressed

  22. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped