Hide navigation sidebar
Hide table of contents sidebar
PTB has undergone significant changes in v20. Please read the documentation carefully and also check out the transition guide in the wiki.
Back to top
Toggle table of contents sidebar

# 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_messages=None, can_edit_messages=None, can_pin_messages=None, can_manage_topics=None, custom_title=None, can_post_stories=None, can_edit_stories=None, can_delete_stories=None, *, api_kwargs=None)

  Bases: `telegram.ChatMember`

  Represents a chat member that has some additional privileges.

  Available In

  - `telegram.ChatMemberUpdated.new_chat_member`

  - `telegram.ChatMemberUpdated.old_chat_member`

  Returned In

  `telegram.Bot.get_chat_member()`

  New in version 13.7.

  Changed in version 20.0:

  - Argument and attribute `can_manage_voice_chats` were renamed to `can_manage_video_chats` and `can_manage_video_chats` in accordance to Bot API 6.0.

  - The argument `can_manage_topics` was added, which changes the position of the optional argument `custom_title`.

  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, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups 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.

      New 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; channels only.

    - can_edit_messages (`bool`, optional) – `True`, if the administrator can edit messages of other users and can pin messages; channels only.

    - can_pin_messages (`bool`, optional) – `True`, if the user is allowed to pin messages; groups and supergroups only.

    - can_post_stories (`bool`, optional) –

      `True`, if the administrator can post stories in the channel; channels only.

      New in version 20.6.

    - can_edit_stories (`bool`, optional) –

      `True`, if the administrator can edit stories posted by other users; channels only.

      New in version 20.6.

    - can_delete_stories (`bool`, optional) –

      `True`, if the administrator can delete stories posted by other users; channels only.

      New in version 20.6.

    - can_manage_topics (`bool`, optional) –

      `True`, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only.

      New in version 20.0.

    - custom_title (`str`, optional) – Custom title for this user.

  status

    The member’s status in the chat, always `'administrator'`.

    Type:

      `str`

  user

    Information about the user.

    Type:

      `telegram.User`

  can_be_edited

    `True`, if the bot is allowed to edit administrator privileges of that user.

    Type:

      `bool`

  is_anonymous

    `True`, if the user’s presence in the chat is hidden.

    Type:

      `bool`

  can_manage_chat

    `True`, if the administrator can access the chat event log, chat statistics, boost list in channels, see channel members, report spam messages, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege.

    Type:

      `bool`

  can_delete_messages

    `True`, if the administrator can delete messages of other users.

    Type:

      `bool`

  can_manage_video_chats

    `True`, if the administrator can manage video chats.

    New in version 20.0.

    Type:

      `bool`

  can_restrict_members

    `True`, if the administrator can restrict, ban or unban chat members, or access supergroup statistics.

    Type:

      `bool`

  can_promote_members

    `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:

      `bool`

  can_change_info

    `True`, if the user can change the chat title, photo and other settings.

    Type:

      `bool`

  can_invite_users

    `True`, if the user can invite new users to the chat.

    Type:

      `bool`

  can_post_messages

    Optional. `True`, if the administrator can post messages in the channel or access channel statistics; channels only.

    Type:

      `bool`

  can_edit_messages

    Optional. `True`, if the administrator can edit messages of other users and can pin messages; channels only.

    Type:

      `bool`

  can_pin_messages

    Optional. `True`, if the user is allowed to pin messages; groups and supergroups only.

    Type:

      `bool`

  can_post_stories

    Optional. `True`, if the administrator can post stories in the channel; channels only.

    New in version 20.6.

    Type:

      `bool`

  can_edit_stories

    Optional. `True`, if the administrator can edit stories posted by other users; channels only.

    New in version 20.6.

    Type:

      `bool`

  can_delete_stories

    Optional. `True`, if the administrator can delete stories posted by other users; channels only.

    New in version 20.6.

    Type:

      `bool`

  can_manage_topics

    Optional. `True`, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only

    New in version 20.0.

    Type:

      `bool`

  custom_title

    Optional. Custom title for this user.

    Type:

      `str`