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_polls=None, can_send_other_messages=None, can_add_web_page_previews=None, is_member=None, **kwargs)¶ Bases:
telegram.base.TelegramObject
This object contains information about one member of the chat.
-
user
¶ Information about the user.
Type: telegram.User
-
status
¶ The member’s status in the chat.
Type: str
-
until_date
¶ Optional. Date when restrictions will be lifted for this user.
Type: datetime.datetime
-
can_be_edited
¶ Optional. If the bot is allowed to edit administrator privileges of that user.
Type: bool
-
can_change_info
¶ Optional. If the user can change the chat title, photo and other settings.
Type: bool
-
can_post_messages
¶ Optional. If the administrator can post in the channel.
Type: bool
-
can_edit_messages
¶ Optional. If the administrator can edit messages of other users.
Type: bool
-
can_delete_messages
¶ Optional. If the administrator can delete messages of other users.
Type: bool
-
can_invite_users
¶ Optional. If the user can invite new users to the chat.
Type: bool
-
can_restrict_members
¶ Optional. If the administrator can restrict, ban or unban chat members.
Type: bool
-
can_pin_messages
¶ Optional. If the user can pin messages.
Type: bool
-
can_promote_members
¶ Optional. If the administrator can add new administrators.
Type: bool
-
is_member
¶ Optional. Restricted only. True, if the user is a member of the chat at the moment of the request.
Type: bool
-
can_send_messages
¶ Optional. If the user can send text messages, contacts, locations and venues.
Type: bool
-
can_send_media_messages
¶ Optional. If the user can send media messages, implies can_send_messages.
Type: bool
-
can_send_polls
¶ Optional. True, if the user is allowed to send polls.
Type: bool
-
can_send_other_messages
¶ Optional. If the user can send animations, games, stickers and use inline bots, implies can_send_media_messages.
Type: bool
-
can_add_web_page_previews
¶ Optional. If user may add web page previews to his messages, implies can_send_media_messages
Type: bool
Parameters: - user (
telegram.User
) – Information about the user. - status (
str
) – The member’s status in the chat. Can be ‘creator’, ‘administrator’, ‘member’, ‘restricted’, ‘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 and restricted only. True, if the user 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 and restricted only. True, if the user 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 and restricted only. True, if the user 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). - is_member (
bool
, optional) – Restricted only. True, if the user is a member of the chat at the moment of the request. - 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_polls (
bool
, optional) – Restricted only. True, if the user is allowed to send polls. - 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'¶ ‘administrator’
Type: str
-
CREATOR
= 'creator'¶ ‘creator’
Type: str
-
KICKED
= 'kicked'¶ ‘kicked’
Type: str
-
LEFT
= 'left'¶ ‘left’
Type: str
-
MEMBER
= 'member'¶ ‘member’
Type: str
-
RESTRICTED
= 'restricted'¶ ‘restricted’
Type: str
-