Context of a chosen inline result update.

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

Note: To receive these updates, you must enable Inline feedback in @BotFather

Hierarchy (View Summary)

Implements

Constructors

Properties

_name: "chosen_inline_result" = ...
_peers: PeersIndex

Accessors

  • get id(): string
  • Unique identifier of the chosen result, as set in InputInlineResult.id

    Returns string

  • get location(): null | Location
  • Sender location, only applicable to bots that requested user location

    Returns null | Location

  • get messageId(): null | TypeInputBotInlineMessageID
  • Identifier of the sent inline message, which can be used in TelegramClient.editInlineMessage

    Note: this is only available in case the InputInlineMessage contained a reply keyboard markup.

    Returns null | TypeInputBotInlineMessageID

  • get messageIdStr(): null | string
  • Identifier of the sent inline message as a TDLib and Bot API compatible string. Can be used instead of messageId in case you want to store it in some storage.

    Note: this is only available in case the InputInlineMessage contained a reply keyboard markup.

    Returns null | string

  • get query(): string
  • The query that was previously sent by the user, which was used to obtain this result

    Returns string

  • get user(): User
  • User who has chosen the query

    Returns User

Methods

  • Edit the message that was sent when this inline result that was chosen.

    Note: This method can only be used if the message contained a reply markup

    Parameters

    • params: {
          disableWebPreview?: boolean;
          invertMedia?: boolean;
          media?: InputMediaLike;
          messageId: string | TypeInputBotInlineMessageID;
          progressCallback?: (uploaded: number, total: number) => void;
          replyMarkup?: ReplyMarkup;
          text?: InputText;
      }
      • OptionaldisableWebPreview?: boolean

        Whether to disable links preview in this message

      • OptionalinvertMedia?: boolean

        Whether to invert media position.

        Currently only supported for web previews and makes the client render the preview above the caption and not below.

      • Optionalmedia?: InputMediaLike

        New message media

      • messageId: string | TypeInputBotInlineMessageID

        Inline message ID, either as a TL object, or as a TDLib and Bot API compatible string

      • OptionalprogressCallback?: (uploaded: number, total: number) => void

        For media, upload progress callback.

      • OptionalreplyMarkup?: ReplyMarkup

        For bots: new reply markup. If omitted, existing markup will be removed.

      • Optionaltext?: InputText

        New message text

        When media is passed, media.caption is used instead

    Returns Promise<void>