telegram.ChatMember

class telegram.ChatMember(*args, **kwargs)[source]

Bases: telegram.TelegramObject

Base class for Telegram ChatMember Objects. Currently, the following 6 types of chat members are supported:

Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if their user and status are equal.

Changed in version 20.0:

  • As of Bot API 5.3, ChatMember is nothing but the base class for the subclasses listed above and is no longer returned directly by get_chat(). Therefore, most of the arguments and attributes were removed and you should no longer use ChatMember directly.

  • The constant ChatMember.CREATOR was replaced by OWNER

  • The constant ChatMember.KICKED was replaced by BANNED

Parameters
user[source]

Information about the user.

Type

telegram.User

status[source]

The member’s status in the chat.

Type

str

ADMINISTRATOR = 'administrator'[source]

telegram.constants.ChatMemberStatus.ADMINISTRATOR

BANNED = 'kicked'[source]

telegram.constants.ChatMemberStatus.BANNED

LEFT = 'left'[source]

telegram.constants.ChatMemberStatus.LEFT

MEMBER = 'member'[source]

telegram.constants.ChatMemberStatus.MEMBER

OWNER = 'creator'[source]

telegram.constants.ChatMemberStatus.OWNER

RESTRICTED = 'restricted'[source]

telegram.constants.ChatMemberStatus.RESTRICTED

classmethod de_json(data, bot)[source]

See telegram.TelegramObject.de_json().

to_dict()[source]

See telegram.TelegramObject.to_dict().