InlineKeyboardButtonType

public indirect enum InlineKeyboardButtonType : Codable, Equatable, FunctionResult, TDEnum, EquatableEnum

Describes the type of an inline keyboard button

  • A button that opens a specified URL

    • url: HTTP or tg:// URL to open

    Declaration

    Swift

    case url(url: String)
  • A button that opens a specified URL and automatically logs in in current user if they allowed to do that

    • url: An HTTP URL to open
    • id: Unique button identifier
    • forwardText: If non-empty, new text of the button in forwarded messages

    Declaration

    Swift

    case loginUrl(url: String, id: Int32, forwardText: String)
  • A button that sends a special callback query to a bot

    • data: Data to be sent to the bot via a callback query

    Declaration

    Swift

    case callback(data: Bytes)
  • A button with a game that sends a special callback query to a bot. This button must be in the first column and row of the keyboard and can be attached only to a message with content of the type messageGame

    Declaration

    Swift

    case callbackGame
  • A button that forces an inline query to the bot to be inserted in the input field

    • query: Inline query to be sent to the bot
    • inCurrentChat: True, if the inline query should be sent from the current chat

    Declaration

    Swift

    case switchInline(query: String, inCurrentChat: Bool)
  • buy

    A button to buy something. This button must be in the first column and row of the keyboard and can be attached only to a message with content of the type messageInvoice

    Declaration

    Swift

    case buy