Context of an inline query update.

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

Hierarchy (View Summary)

Implements

Constructors

Properties

Accessors

Methods

Constructors

Properties

_name: "inline_query" = ...
_peers: PeersIndex

Accessors

  • get id(): Long
  • Unique query ID

    Returns Long

  • get location(): null | Location
  • Attached geolocation.

    Only used in case the bot requested user location

    Returns null | Location

  • get offset(): string
  • Inline query scroll offset, controlled by the bot

    Returns string

  • get peerType(): null | PeerType
  • Peer type from which this query was sent.

    Can be:

    • bot: Query was sent in this bot's PM
    • user: Query was sent in somebody's PM
    • group: Query was sent in a legacy group
    • supergroup: Query was sent in a supergroup
    • channel: Query was sent in a channel
    • null, in case this information is not available

    Returns null | PeerType

  • get query(): string
  • Text of the query (0-512 characters)

    Returns string

  • get user(): User
  • User who sent this query

    Returns User

Methods

  • Answer to this inline query

    Parameters

    • ...params: [
          results: InputInlineResult[],
          params?: {
              cacheTime?: number;
              gallery?: boolean;
              nextOffset?: string;
              private?: boolean;
              switchPm?: { parameter: string; text: string };
              switchWebview?: { text: string; url: string };
          },
      ]

    Returns Promise<void>