InlineQuery constructor

const InlineQuery({
  1. @JsonKey(name: 'id') required String id,
  2. @JsonKey(name: 'from') required User from,
  3. @JsonKey(name: 'query') required String query,
  4. @JsonKey(name: 'offset') required String offset,
  5. @JsonKey(name: 'chat_type') ChatType? chatType,
  6. Location? location,
})

Creates an incoming inline query

id Unique identifier for this query from Sender query Text of the query (up to 256 characters) offset Offset of the results to be returned, can be controlled by the bot chatType Type of the chat from which the inline query was sent location Sender location, only for bots that request user location

Implementation

const factory InlineQuery({
  /// Unique identifier for this query
  @JsonKey(name: 'id') required String id,

  /// Sender
  @JsonKey(name: 'from') required User from,

  /// Text of the query (up to 256 characters)
  @JsonKey(name: 'query') required String query,

  /// Offset of the results to be returned, can be controlled by the bot
  @JsonKey(name: 'offset') required String offset,

  /// Optional. Type of the chat from which the inline query was sent.
  /// Can be either "sender" for a private chat with the inline query sender,
  /// "private", "group", "supergroup", or "channel". The chat type should be
  /// always known for requests sent from official clients and most third-party
  /// clients, unless the request was sent from a secret chat
  @JsonKey(name: 'chat_type') ChatType? chatType,

  /// Optional. Sender location, only for bots that request user location
  Location? location,
}) = _InlineQuery;