ChatMemberAdministrator¶
- class telegram.ChatMemberAdministrator(user, can_be_edited, is_anonymous, can_manage_chat, can_delete_messages, can_manage_video_chats, can_restrict_members, can_promote_members, can_change_info, can_invite_users, can_post_stories, can_edit_stories, can_delete_stories, can_post_messages=None, can_edit_messages=None, can_pin_messages=None, can_manage_topics=None, custom_title=None, *, api_kwargs=None)[source]¶
Bases:
telegram.ChatMember
Represents a chat member that has some additional privileges.
Returned In
Added in version 13.7.
Changed in version 20.0:
Argument and attribute
can_manage_voice_chats
were renamed tocan_manage_video_chats
andcan_manage_video_chats
in accordance to Bot API 6.0.The argument
can_manage_topics
was added, which changes the position of the optional argumentcustom_title
.
Changed in version 21.1: As of this version,
can_post_stories
,can_edit_stories
, andcan_delete_stories
is now required. Thus, the order of arguments had to be changed.- Parameters:
user (
telegram.User
) – Information about the user.can_be_edited (
bool
) –True
, if the bot is allowed to edit administrator privileges of that user.is_anonymous (
bool
) –True
, if the user’s presence in the chat is hidden.can_manage_chat (
bool
) –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. Implied by any other administrator privilege.can_delete_messages (
bool
) –True
, if the administrator can delete messages of other users.can_manage_video_chats (
bool
) –True
, if the administrator can manage video chats.Added in version 20.0.
can_restrict_members (
bool
) –True
, if the administrator can restrict, ban or unban chat members.can_promote_members (
bool
) –True
, if the administrator can add new administrators with a subset of his own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by the user).can_change_info (
bool
) –True
, if the user can change the chat title, photo and other settings.can_invite_users (
bool
) –True
, if the user can invite new users to the chat.can_post_messages (
bool
, optional) –True
, if the administrator can post messages in the channel, or access channel statistics; for channels only.can_edit_messages (
bool
, optional) –True
, if the administrator can edit messages of other users and can pin messages; for channels only.can_pin_messages (
bool
, optional) –True
, if the user is allowed to pin messages; for groups and supergroups only.can_post_stories (
bool
) –True
, if the administrator can post stories to the chat.Added in version 20.6.
Changed in version 21.0: As of this version, this argument is now required. In accordance with our stability policy, the signature will be kept as optional for now, though they are mandatory and an error will be raised if you don’t pass it.
can_edit_stories (
bool
) –True
, if the administrator can edit stories posted by other users, post stories to the chat page, pin chat stories, and access the chat’s story archiveAdded in version 20.6.
Changed in version 21.0: As of this version, this argument is now required. In accordance with our stability policy, the signature will be kept as optional for now, though they are mandatory and an error will be raised if you don’t pass it.
True
, if the administrator can delete stories posted by other users.Added in version 20.6.
Changed in version 21.0: As of this version, this argument is now required. In accordance with our stability policy, the signature will be kept as optional for now, though they are mandatory and an error will be raised if you don’t pass it.
can_manage_topics (
bool
, optional) –True
, if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only.Added in version 20.0.
custom_title (
str
, optional) – Custom title for this user.
- status[source]¶
The member’s status in the chat, always
'administrator'
.- Type:
- can_be_edited[source]¶
True
, if the bot is allowed to edit administrator privileges of that user.- Type:
- can_manage_chat[source]¶
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. Implied by any other administrator privilege.- Type:
- can_manage_video_chats[source]¶
True
, if the administrator can manage video chats.Added in version 20.0.
- Type:
- can_restrict_members[source]¶
True
, if the administrator can restrict, ban or unban chat members, or access supergroup statistics.- Type:
- can_promote_members[source]¶
True
, if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by the user).- Type:
- can_change_info[source]¶
True
, if the user can change the chat title, photo and other settings.- Type:
- can_post_messages[source]¶
Optional.
True
, if the administrator can post messages in the channel or access channel statistics; for channels only.- Type:
- can_edit_messages[source]¶
Optional.
True
, if the administrator can edit messages of other users and can pin messages; for channels only.- Type:
- can_pin_messages[source]¶
Optional.
True
, if the user is allowed to pin messages; for groups and supergroups only.- Type:
- can_post_stories[source]¶
True
, if the administrator can post stories to the chat.Added in version 20.6.
Changed in version 21.0: As of this version, this argument is now required. In accordance with our stability policy, the signature will be kept as optional for now, though they are mandatory and an error will be raised if you don’t pass it.
- Type:
- can_edit_stories[source]¶
True
, if the administrator can edit stories posted by other users, post stories to the chat page, pin chat stories, and access the chat’s story archiveAdded in version 20.6.
Changed in version 21.0: As of this version, this argument is now required. In accordance with our stability policy, the signature will be kept as optional for now, though they are mandatory and an error will be raised if you don’t pass it.
- Type:
- can_delete_stories[source]¶
True
, if the administrator can delete stories posted by other users.Added in version 20.6.
Changed in version 21.0: As of this version, this argument is now required. In accordance with our stability policy, the signature will be kept as optional for now, though they are mandatory and an error will be raised if you don’t pass it.
- Type: