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

    Class ReplyKeyboard

    Fluent builder for creating ReplyKeyboardMarkup objects.

    const keyboard = new ReplyKeyboard({ resize_keyboard: true })
    .text("Option A")
    .text("Option B")
    .row()
    .requestLocation("Share Location");

    await bot.sendMessage({
    chat_id: 12345,
    text: "Make a selection:",
    reply_markup: keyboard.build(),
    });
    Index
    • Appends a button that prompts the user to select a chat.

      Parameters

      • text: string

        Button label text.

      • requestId: number

        Signed 32-bit identifier of the request.

      • chatIsChannel: boolean

        Pass true to request a channel chat, false for a group.

      • options: {
            bot_is_member?: boolean;
            chat_has_username?: boolean;
            chat_is_created?: boolean;
            chat_is_forum?: boolean;
            request_photo?: boolean;
            request_title?: boolean;
            request_username?: boolean;
        } = {}

        Additional chat selection criteria.

      Returns this

      This ReplyKeyboard instance for chaining.

    • Appends a button that prompts the user to share their contact.

      Parameters

      • text: string

        Button label text.

      Returns this

      This ReplyKeyboard instance for chaining.

    • Appends a button that prompts the user to share their location.

      Parameters

      • text: string

        Button label text.

      Returns this

      This ReplyKeyboard instance for chaining.

    • Appends a button that prompts the user to create and send a poll.

      Parameters

      • text: string

        Button label text.

      • Optionaltype: "regular" | "quiz"

        Optional poll type restriction ("quiz" or "regular").

      Returns this

      This ReplyKeyboard instance for chaining.

    • Appends a button that prompts the user to select one or more users.

      Parameters

      • text: string

        Button label text.

      • requestId: number

        Signed 32-bit identifier of the request.

      • options: {
            max_quantity?: number;
            request_name?: boolean;
            request_photo?: boolean;
            request_username?: boolean;
            user_is_bot?: boolean;
            user_is_premium?: boolean;
        } = {}

        Additional user selection filters.

      Returns this

      This ReplyKeyboard instance for chaining.

    • Advances the builder to start a new keyboard row.

      Returns this

      This ReplyKeyboard instance for chaining.

    • Appends a plain text button to the current row.

      Parameters

      • text: string

        Text sent to the bot as a message when the button is pressed.

      Returns this

      This ReplyKeyboard instance for chaining.

    • Appends a button that launches a Telegram Mini App Web App.

      Parameters

      • text: string

        Button label text.

      • url: string

        HTTPS URL of the Web App.

      Returns this

      This ReplyKeyboard instance for chaining.