KeyboardButtonRequestChat constructor

const KeyboardButtonRequestChat({
  1. @JsonKey(name: 'request_id') required int requestId,
  2. @JsonKey(name: 'chat_is_channel') required bool chatIsChannel,
  3. @JsonKey(name: 'chat_is_forum') bool? chatIsForum,
  4. @JsonKey(name: 'chat_has_username') bool? chatHasUsername,
  5. @JsonKey(name: 'chat_is_created') bool? chatIsCreated,
  6. @JsonKey(name: 'user_administrator_rights') ChatAdministratorRights? userAdministratorRights,
  7. @JsonKey(name: 'bot_administrator_rights') ChatAdministratorRights? botAdministratorRights,
  8. @JsonKey(name: 'bot_is_member') bool? botIsMember,
  9. @JsonKey(name: 'request_title') bool? requestTitle,
  10. @JsonKey(name: 'request_username') bool? requestUsername,
  11. @JsonKey(name: 'request_photo') bool? requestPhoto,
})

Creates a new KeyboardButtonRequestChat object.

Implementation

const factory KeyboardButtonRequestChat({
  /// Signed 32-bit identifier of the request.
  @JsonKey(name: 'request_id') required int requestId,

  /// Pass True to request a channel chat, pass False to request a group or a
  /// supergroup chat.
  @JsonKey(name: 'chat_is_channel') required bool chatIsChannel,

  /// Optional. Pass True to request a forum supergroup, pass False to request
  /// a non-forum chat. If not specified, no additional restrictions are
  /// applied.
  @JsonKey(name: 'chat_is_forum') bool? chatIsForum,

  /// Optional. Pass True to request a supergroup or a channel with a
  /// username, pass False to request a chat without a username. If not
  /// specified, no additional restrictions are applied.
  @JsonKey(name: 'chat_has_username') bool? chatHasUsername,

  /// Optional. Pass True to request a chat owned by the user. Otherwise, no
  /// additional restrictions are applied.
  @JsonKey(name: 'chat_is_created') bool? chatIsCreated,

  /// Optional. A JSON-serialized object listing the required administrator
  /// rights of the user in the chat. If not specified, no additional
  /// restrictions are applied.
  @JsonKey(name: 'user_administrator_rights')
  ChatAdministratorRights? userAdministratorRights,

  /// Optional. A JSON-serialized object listing the required administrator
  /// rights of the bot in the chat. The rights must be a subset of
  /// user_administrator_rights. If not specified, no additional restrictions
  /// are applied.
  @JsonKey(name: 'bot_administrator_rights')
  ChatAdministratorRights? botAdministratorRights,

  /// Optional. Pass True to request a chat with the bot as a member.
  /// Otherwise, no additional restrictions are applied.
  @JsonKey(name: 'bot_is_member') bool? botIsMember,

  /// Optional. Pass True to request the chat's title.
  @JsonKey(name: 'request_title') bool? requestTitle,

  /// Optional. Pass True to request the chat's username.
  @JsonKey(name: 'request_username') bool? requestUsername,

  /// Optional. Pass True to request the chat's photo.
  @JsonKey(name: 'request_photo') bool? requestPhoto,
}) = _KeyboardButtonRequestChat;