telebot-ts API Documentation - v1.0.0
    Preparing search index...

    Class InlineKeyboard

    Fluent builder for creating InlineKeyboardMarkup objects.

    const keyboard = new InlineKeyboard()
    .text("Option 1", "opt_1")
    .text("Option 2", "opt_2")
    .row()
    .url("Website", "https://example.com");

    await bot.sendMessage({
    chat_id: 12345,
    text: "Choose an option:",
    reply_markup: keyboard.build(),
    });
    Index
    • Appends a copy text button to the current row.

      Parameters

      • text: string

        Label text on the button.

      • copyText: string

        Text to be copied to the clipboard.

      Returns this

      This InlineKeyboard instance for chaining.

    • Advances the builder to start a new keyboard row.

      Returns this

      This InlineKeyboard instance for chaining.

    • Appends an inline query button to the current row.

      Parameters

      • text: string

        Label text on the button.

      • query: string = ""

        Inline query string inserted in the chat input field.

      Returns this

      This InlineKeyboard instance for chaining.

    • Appends an inline query button for the current chat to the current row.

      Parameters

      • text: string

        Label text on the button.

      • query: string = ""

        Inline query string inserted in the current chat.

      Returns this

      This InlineKeyboard instance for chaining.

    • Appends a callback button to the current row.

      Parameters

      • text: string

        Label text on the button.

      • callbackData: string

        Data to be sent in a callback query to the bot when pressed.

      Returns this

      This InlineKeyboard instance for chaining.

    • Appends an HTTP URL button to the current row.

      Parameters

      • text: string

        Label text on the button.

      • url: string

        HTTP or tg:// URL to be opened when the button is pressed.

      Returns this

      This InlineKeyboard instance for chaining.

    • Appends a Web App button to the current row.

      Parameters

      • text: string

        Label text on the button.

      • url: string

        HTTPS URL of a Web App to be opened.

      Returns this

      This InlineKeyboard instance for chaining.