ChatJoinRequest constructor

const ChatJoinRequest({
  1. @JsonKey(name: 'chat') required Chat chat,
  2. @JsonKey(name: 'from') required User from,
  3. @JsonKey(name: 'date') required int date,
  4. @JsonKey(name: 'bio') String? bio,
  5. @JsonKey(name: 'invite_link') ChatInviteLink? inviteLink,
  6. @JsonKey(name: 'user_chat_id') required int userChatId,
})

Creates a new ChatJoinRequest object.

Implementation

const factory ChatJoinRequest({
  /// Chat to which the request was sent
  @JsonKey(name: 'chat') required Chat chat,

  /// User that sent the join request
  @JsonKey(name: 'from') required User from,

  /// Date the request was sent in Unix time
  ///
  /// You can use the [dateTime] getter to get a [DateTime] object
  @JsonKey(name: 'date') required int date,

  /// Optional. Bio of the user.
  @JsonKey(name: 'bio') String? bio,

  /// Optional. Chat invite link that was used by the user to send the join request
  @JsonKey(name: 'invite_link') ChatInviteLink? inviteLink,

  /// Since Bot API 6.5
  ///
  /// Identifier of a private chat with the user who sent the join request. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot can use this identifier for 24 hours to send messages until the join request is processed, assuming no other administrator contacted the user.
  @JsonKey(name: 'user_chat_id') required int userChatId,
}) = _ChatJoinRequest;