Documentation - v0.27.0
    Preparing search index...

    Class InlineCallbackQueryContext

    Context of an inline-originated callback query update.

    This is a subclass of InlineCallbackQuery, so all its fields are also available.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    _name: "inline_callback_query" = ...
    _peers: PeersIndex

    Accessors

    • get data(): Uint8Array<ArrayBufferLike> | null

      Data that was contained in the callback button, if any

      Note that this field is defined by the client, and a bad client can send arbitrary data in this field.

      Returns Uint8Array<ArrayBufferLike> | null

    • get dataStr(): string | null

      Data that was contained in the callback button, if any, parsed as a UTF8 string

      Note that this field is defined by the client, and a bad client can send arbitrary data in this field.

      Returns string | null

    • get inlineMessageIdStr(): string

      Identifier of the previously sent inline message, that contained the button which was clicked, as a TDLib and Bot API compatible string. Can be used instead of inlineMessageId in case you want to store it in some storage.

      Returns string

    Methods

    • Answer to this callback query

      Parameters

      • params: { alert?: boolean; cacheTime?: number; text?: string; url?: string } | undefined
        • { alert?: boolean; cacheTime?: number; text?: string; url?: string }
          • Optionalalert?: boolean

            Whether to show an alert in the middle of the screen instead of a notification at the top of the screen.

            false
            
          • OptionalcacheTime?: number

            Maximum amount of time in seconds for which this result can be cached by the client (not server!).

            0
            
          • Optionaltext?: string

            Text of the notification (0-200 chars).

            If not set, nothing will be displayed

          • Optionalurl?: string

            URL that the client should open.

            If this was a button containing a game, you can provide arbitrary link to your game. Otherwise, you can only use links in the format t.me/your_bot?start=... that open your bot with a deep-link parameter.

        • undefined

      Returns Promise<void>