telegram.ChatMember

class telegram.ChatMember(user, status, until_date=None, can_be_edited=None, can_change_info=None, can_post_messages=None, can_edit_messages=None, can_delete_messages=None, can_invite_users=None, can_restrict_members=None, can_pin_messages=None, can_promote_members=None, can_send_messages=None, can_send_media_messages=None, can_send_other_messages=None, can_add_web_page_previews=None, **kwargs)

Bases: telegram.base.TelegramObject

This object contains information about one member of the chat.

user

telegram.User – Information about the user.

status

str – The member’s status in the chat.

until_date

datetime.datetime – Optional. Date when restrictions will be lifted for this user.

can_be_edited

bool – Optional. If the bot is allowed to edit administrator privileges of that user.

can_change_info

bool – Optional. If the administrator can change the chat title, photo and other settings.

can_post_messages

bool – Optional. If the administrator can post in the channel.

can_edit_messages

bool – Optional. If the administrator can edit messages of other users.

can_delete_messages

bool – Optional. If the administrator can delete messages of other users.

can_invite_users

bool – Optional. If the administrator can invite new users to the chat.

can_restrict_members

bool – Optional. If the administrator can restrict, ban or unban chat members.

can_pin_messages

bool – Optional. If the administrator can pin messages.

can_promote_members

bool – Optional. If the administrator can add new administrators.

can_send_messages

bool – Optional. If the user can send text messages, contacts, locations and venues.

can_send_media_messages

bool – Optional. If the user can send media messages, implies can_send_messages.

can_send_other_messages

bool – Optional. If the user can send animations, games, stickers and use inline bots, implies can_send_media_messages.

can_add_web_page_previews

bool – Optional. If user may add web page previews to his messages, implies can_send_media_messages

Parameters:
  • user (telegram.User) – Information about the user.
  • status (str) – The member’s status in the chat. Can be ‘creator’, ‘administrator’, ‘member’, ‘left’ or ‘kicked’.
  • until_date (datetime.datetime, optional) – Restricted and kicked only. Date when restrictions will be lifted for this user.
  • can_be_edited (bool, optional) – Administrators only. True, if the bot is allowed to edit administrator privileges of that user.
  • can_change_info (bool, optional) – Administrators only. True, if the administrator can change the chat title, photo and other settings.
  • can_post_messages (bool, optional) – Administrators only. True, if the administrator can post in the channel, channels only.
  • can_edit_messages (bool, optional) – Administrators only. True, if the administrator can edit messages of other users, channels only.
  • can_delete_messages (bool, optional) – Administrators only. True, if the administrator can delete messages of other user.
  • can_invite_users (bool, optional) – Administrators only. True, if the administrator can invite new users to the chat.
  • can_restrict_members (bool, optional) – Administrators only. True, if the administrator can restrict, ban or unban chat members.
  • can_pin_messages (bool, optional) – Administrators only. True, if the administrator can pin messages, supergroups only.
  • can_promote_members (bool, optional) – Administrators only. 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_send_messages (bool, optional) – Restricted only. True, if the user can send text messages, contacts, locations and venues.
  • can_send_media_messages (bool, optional) – Restricted only. True, if the user can send audios, documents, photos, videos, video notes and voice notes, implies can_send_messages.
  • can_send_other_messages (bool, optional) – Restricted only. True, if the user can send animations, games, stickers and use inline bots, implies can_send_media_messages.
  • can_add_web_page_previews (bool, optional) – Restricted only. True, if user may add web page previews to his messages, implies can_send_media_messages.
ADMINISTRATOR = 'administrator'

str – ‘administrator’

CREATOR = 'creator'

str – ‘creator’

KICKED = 'kicked'

str – ‘kicked’

LEFT = 'left'

str – ‘left’

MEMBER = 'member'

str – ‘member’