Documentation - v0.32.8
    Preparing search index...

    Function getWidgetQueryAnswer

    • Send a query to the bot from a widget inside a message and wait for the bot's answer.

      Parameters

      • client: ITelegramClient
      • params: InputMessageId & {
            data: string | Uint8Array<ArrayBufferLike>;
            type?: TypeWidgetQueryType | undefined;
        }
        • data: string | Uint8Array<ArrayBufferLike>

          Data to be sent to the bot (1-64 bytes)

        • Optionaltype?: TypeWidgetQueryType | undefined

          Type of the query

          { _: 'widgetQueryTypeData' }

      Returns Promise<string | null>

      Result returned by the bot, or null if the bot sent an empty answer