Added fields to ChatMember (#340)

* Added fields to ChatMember
* Added ChatMemberStatus helper
This commit is contained in:
lyteloli 2020-05-29 22:28:12 +03:00 committed by GitHub
parent de3c5c1a8d
commit 9f11afda5b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 78 additions and 0 deletions

View file

@ -30,12 +30,33 @@ This object contains information about one member of a chat.
| `can_add_web_page_previews` | `#!python Optional[bool]` | Optional. Restricted only. True, if the user is allowed to add web page previews to their messages |
## Extensions
| Name | Type | Description |
| - | - | - |
| `is_chat_admin` | `#!python bool` | True if the user is administrator or creator of the chat |
| `is_chat_member` | `#!python bool` | True if the user is member of the chat |
## ChatMemberStatus helper
This object helps to describe user's status.
#### Attributes:
- CREATOR
- ADMINISTRATOR
- MEMBER
- RESTRICTED
- LEFT
- KICKED
## Location
- `from aiogram.types import ChatMember`
- `from aiogram.api.types import ChatMember`
- `from aiogram.api.types.chat_member import ChatMember`
- `from aiogram.api.types.chat_member import ChatMemberStatus`
## Related pages: