ChatMember¶
- class telegram.ChatMember(user, status, *, api_kwargs=None)[source]¶
Bases:
telegram.TelegramObjectBase 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
userandstatusare equal.Examples
Changed in version 20.0:
As of Bot API 5.3,
ChatMemberis 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 useChatMemberdirectly.The constant
ChatMember.CREATORwas replaced byOWNERThe constant
ChatMember.KICKEDwas replaced byBANNED
- Parameters:
user (
telegram.User) – Information about the user.status (
str) – The member’s status in the chat. Can beADMINISTRATOR,OWNER,BANNED,LEFT,MEMBERorRESTRICTED.
- status[source]¶
The member’s status in the chat. Can be
ADMINISTRATOR,OWNER,BANNED,LEFT,MEMBERorRESTRICTED.- Type:
str