ChatMember.restricted constructor
const
ChatMember.restricted({
- @Default(ChatMemberStatus.restricted) @JsonKey(name: 'status') ChatMemberStatus status,
- @JsonKey(name: 'user') required User user,
- @JsonKey(name: 'is_member') required bool isMember,
- @JsonKey(name: 'can_send_messages') required bool canSendMessages,
- @JsonKey(name: 'can_send_audios') required bool canSendAudios,
- @JsonKey(name: 'can_send_documents') required bool canSendDocuments,
- @JsonKey(name: 'can_send_photos') required bool canSendPhotos,
- @JsonKey(name: 'can_send_videos') required bool canSendVideos,
- @JsonKey(name: 'can_send_video_notes') required bool canSendVideoNotes,
- @JsonKey(name: 'can_send_voice_notes') required bool canSendVoiceNotes,
- @JsonKey(name: 'can_send_polls') required bool canSendPolls,
- @JsonKey(name: 'can_send_other_messages') required bool canSendOtherMessages,
- @JsonKey(name: 'can_add_web_page_previews') required bool canAddWebPagePreviews,
- @JsonKey(name: 'can_change_info') required bool canChangeInfo,
- @JsonKey(name: 'can_invite_users') required bool canInviteUsers,
- @JsonKey(name: 'can_pin_messages') required bool canPinMessages,
- @JsonKey(name: 'can_manage_topics') required bool canManageTopics,
- @JsonKey(name: 'until_date') required int untilDate,
Represents a chat member that is under certain restrictions in the chat. Supergroups only.
The status of this member is always "restricted".
Implementation
const factory ChatMember.restricted({
/// The member's status in the chat
@Default(ChatMemberStatus.restricted)
@JsonKey(name: 'status')
ChatMemberStatus status,
/// Information about the user
@JsonKey(name: 'user') required User user,
/// True, if the user is a member of the chat at the moment of the request
@JsonKey(name: 'is_member') required bool isMember,
/// True, if the user is allowed to send text messages, contacts, giveaways,
/// giveaway winners, invoices, locations and venues
@JsonKey(name: 'can_send_messages') required bool canSendMessages,
/// True, if the user is allowed to send audios
@JsonKey(name: 'can_send_audios') required bool canSendAudios,
/// True, if the user is allowed to send documents
@JsonKey(name: 'can_send_documents') required bool canSendDocuments,
/// True, if the user is allowed to send photos
@JsonKey(name: 'can_send_photos') required bool canSendPhotos,
/// True, if the user is allowed to send videos
@JsonKey(name: 'can_send_videos') required bool canSendVideos,
/// True, if the user is allowed to send video notes
@JsonKey(name: 'can_send_video_notes') required bool canSendVideoNotes,
/// True, if the user is allowed to send voice notes
@JsonKey(name: 'can_send_voice_notes') required bool canSendVoiceNotes,
/// True, if the user is allowed to send polls
@JsonKey(name: 'can_send_polls') required bool canSendPolls,
/// True, if the user is allowed to send animations, games, stickers and use
/// inline bots
@JsonKey(name: 'can_send_other_messages')
required bool canSendOtherMessages,
/// True, if the user is allowed to add web page previews to their messages
@JsonKey(name: 'can_add_web_page_previews')
required bool canAddWebPagePreviews,
/// True, if the user is allowed to change the chat title, photo and other
/// settings
@JsonKey(name: 'can_change_info') required bool canChangeInfo,
/// True, if the user is allowed to invite new users to the chat
@JsonKey(name: 'can_invite_users') required bool canInviteUsers,
/// True, if the user is allowed to pin messages
@JsonKey(name: 'can_pin_messages') required bool canPinMessages,
/// True, if the user is allowed to create forum topics
@JsonKey(name: 'can_manage_topics') required bool canManageTopics,
/// Date when restrictions will be lifted for this user; Unix time. If 0,
/// then the user is restricted forever
@JsonKey(name: 'until_date') required int untilDate,
}) = ChatMemberRestricted;