Method
__init__
(
self,
user: User,
status: str,
*,
api_kwargs: JSONDict | None = None,
)
Source from the content-addressed store, hash-verified
| 91 | """:const:`telegram.constants.ChatMemberStatus.RESTRICTED`""" |
| 92 | |
| 93 | def __init__( |
| 94 | self, |
| 95 | user: User, |
| 96 | status: str, |
| 97 | *, |
| 98 | api_kwargs: JSONDict | None = None, |
| 99 | ): |
| 100 | super().__init__(api_kwargs=api_kwargs) |
| 101 | # Required by all subclasses |
| 102 | self.user: User = user |
| 103 | self.status: str = enum.get_member(constants.ChatMemberStatus, status, status) |
| 104 | |
| 105 | self._id_attrs = (self.user, self.status) |
| 106 | |
| 107 | self._freeze() |
| 108 | |
| 109 | @classmethod |
| 110 | def de_json(cls, data: JSONDict, bot: "Bot | None" = None) -> "ChatMember": |
Tested by
no test coverage detected