ChatMember¶
- class telegram.ChatMember(user, status, *, api_kwargs=None)[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
andstatus
are equal.Examples
Returned In
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 byget_chat()
. Therefore, most of the arguments and attributes were removed and you should no longer useChatMember
directly.The constant
ChatMember.CREATOR
was replaced byOWNER
The constant
ChatMember.KICKED
was replaced byBANNED
- Parameters:
user (
telegram.User
) – Information about the user.status (
str
) – The member’s status in the chat. Can beADMINISTRATOR
,OWNER
,BANNED
,LEFT
,MEMBER
orRESTRICTED
.
- status[source]¶
The member’s status in the chat. Can be
ADMINISTRATOR
,OWNER
,BANNED
,LEFT
,MEMBER
orRESTRICTED
.- Type: