teleproto - v1.229.0
    Preparing search index...

    Class InlineKeyboard

    Keyboard attached to a message, built either from a grid or by chaining.

    const keyboard = new InlineKeyboard()
    .callback("Yes", "yes", { style: { color: "success" } })
    .callback("No", "no", { style: { color: "danger" } })
    .row()
    .url("Open", "https://t.me/durov");

    await client.sendMessage(chat, { message: "Well?", buttons: keyboard });

    Hierarchy

    Index
    • Pays the invoice attached to the message.

      Parameters

      • text: string
      • options: ButtonOptions = {}

      Returns this

    • Sends data back as a callback query when pressed.

      Parameters

      • text: string
      • data: string | Buffer<ArrayBufferLike>
      • options: CallbackButtonOptions = {}

      Returns this

    • Reflows every button into rows of at most count buttons.

      Parameters

      • count: number

      Returns this

    • Copies text to the clipboard.

      Parameters

      • text: string
      • copyText: string
      • options: ButtonOptions = {}

      Returns this

    • Shown greyed out and does nothing when pressed.

      Parameters

      • text: string
      • options: ButtonOptions = {}

      Returns this

    • Focuses the input field when the message arrives.

      Parameters

      • forceReply: boolean = true

      Returns this

    • Starts the game attached to the message.

      Parameters

      • text: string
      • options: ButtonOptions = {}

      Returns this

    • Starts a new row; empty rows are dropped when the keyboard is built.

      Returns this

    • Asks the user for a chat and starts an inline query there.

      Parameters

      • text: string
      • options: SwitchInlineButtonOptions = {}

      Returns this

    • Opens a link.

      Parameters

      • text: string
      • url: string
      • options: ButtonOptions = {}

      Returns this

    • Logs the user into a website, optionally letting a bot write to them.

      Parameters

      • text: string
      • url: string
      • options: UrlAuthButtonOptions = {}

      Returns this

    • Opens a user's profile.

      Parameters

      • text: string
      • user: EntityLike
      • options: ButtonOptions = {}

      Returns this

    • Opens a web app.

      Parameters

      • text: string
      • url: string
      • options: ButtonOptions = {}

      Returns this