ChatMember.administrator constructor
const
ChatMember.administrator({
- @Default(ChatMemberStatus.administrator) @JsonKey(name: 'status') ChatMemberStatus status,
- @JsonKey(name: 'user') required User user,
- @JsonKey(name: 'can_be_edited') required bool canBeEdited,
- @JsonKey(name: 'is_anonymous') required bool isAnonymous,
- @JsonKey(name: 'can_manage_chat') required bool canManageChat,
- @JsonKey(name: 'can_delete_messages') required bool canDeleteMessages,
- @JsonKey(name: 'can_manage_video_chats') required bool canManageVideoChats,
- @JsonKey(name: 'can_restrict_members') required bool canRestrictMembers,
- @JsonKey(name: 'can_promote_members') required bool canPromoteMembers,
- @JsonKey(name: 'can_change_info') required bool canChangeInfo,
- @JsonKey(name: 'can_invite_users') required bool canInviteUsers,
- @JsonKey(name: 'can_post_stories') required bool canPostStories,
- @JsonKey(name: 'can_edit_stories') required bool canEditStories,
- @JsonKey(name: 'can_delete_stories') required bool canDeleteStories,
- @JsonKey(name: 'can_post_messages') bool? canPostMessages,
- @JsonKey(name: 'can_edit_messages') bool? canEditMessages,
- @JsonKey(name: 'can_pin_messages') bool? canPinMessages,
- @JsonKey(name: 'can_manage_topics') bool? canManageTopics,
- @JsonKey(name: 'custom_title') String? customTitle,
Represents a chat member that has some additional privileges.
The status of this member is always "administrator".
Implementation
const factory ChatMember.administrator({
/// The member's status in the chat
@Default(ChatMemberStatus.administrator)
@JsonKey(name: 'status')
ChatMemberStatus status,
/// Information about the user
@JsonKey(name: 'user') required User user,
/// True, if the bot is allowed to edit administrator privileges of that
/// user
@JsonKey(name: 'can_be_edited') required bool canBeEdited,
/// True, if the user's presence in the chat is hidden
@JsonKey(name: 'is_anonymous') required bool isAnonymous,
/// True, if the administrator can access the chat event log, get boost
/// list, see hidden supergroup and channel members, report spam messages
/// and ignore slow mode
@JsonKey(name: 'can_manage_chat') required bool canManageChat,
/// True, if the administrator can delete messages of other users
@JsonKey(name: 'can_delete_messages') required bool canDeleteMessages,
/// True, if the administrator can manage video chats
@JsonKey(name: 'can_manage_video_chats') required bool canManageVideoChats,
/// True, if the administrator can restrict, ban or unban chat members, or
/// access supergroup statistics
@JsonKey(name: 'can_restrict_members') required bool canRestrictMembers,
/// True, if the administrator can add new administrators with a subset of
/// their own privileges or demote administrators that they have promoted
@JsonKey(name: 'can_promote_members') required bool canPromoteMembers,
/// 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 administrator can post stories to the chat
@JsonKey(name: 'can_post_stories') required bool canPostStories,
/// True, if the administrator can edit stories posted by other users
@JsonKey(name: 'can_edit_stories') required bool canEditStories,
/// True, if the administrator can delete stories posted by other users
@JsonKey(name: 'can_delete_stories') required bool canDeleteStories,
/// Optional. True, if the administrator can post messages in the channel,
/// or access channel statistics
@JsonKey(name: 'can_post_messages') bool? canPostMessages,
/// Optional. True, if the administrator can edit messages of other users
/// and can pin messages
@JsonKey(name: 'can_edit_messages') bool? canEditMessages,
/// Optional. True, if the user is allowed to pin messages
@JsonKey(name: 'can_pin_messages') bool? canPinMessages,
/// Optional. True, if the user is allowed to create, rename, close, and
/// reopen forum topics
@JsonKey(name: 'can_manage_topics') bool? canManageTopics,
/// Optional. Custom title for this user
@JsonKey(name: 'custom_title') String? customTitle,
}) = ChatMemberAdministrator;