• Request a callback answer from a bot, i.e. click an inline button that contains data.

    Parameters

    • client: ITelegramClient
    • params: InputMessageId & {
          data: string | Uint8Array;
          fireAndForget?: boolean;
          game?: boolean;
          password?: string;
          timeout?: number;
      }
      • data: string | Uint8Array

        Data contained in the button

      • OptionalfireAndForget?: boolean

        Whether to "fire and forget" this request, in which case the promise will resolve as soon as the request is sent with an empty response.

        Useful for interacting with bots that don't correctly answer to callback queries and the request always times out.

        Note: any errors will be silently ignored.

      • Optionalgame?: boolean

        Whether this is a "play game" button

      • Optionalpassword?: string

        If the button requires password entry, your 2FA password.

        Your password is never exposed to the bot, it is checked by Telegram.

      • Optionaltimeout?: number

        Timeout for the query in ms.

        10000 (10 sec)

    Returns Promise<tl.messages.TypeBotCallbackAnswer>