Added support for topics in Bot API 6.3 (#1061)

* Added support for topics in Bot API 6.3

* Added the field can_manage_topics

* Added new classes for topics

* Added is_forum field to Chat class

Co-authored-by: katant <katantdev@mail.ru>
This commit is contained in:
KatantDev 2022-11-06 08:51:42 +10:00 committed by GitHub
parent 8604ab7cd0
commit 27dea25c52
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 210 additions and 9 deletions

View file

@ -61,6 +61,7 @@ CHAT_MEMBER = {
"can_promote_members": False,
"can_manage_voice_chats": True, # Deprecated
"can_manage_video_chats": True,
"can_manage_topics": True,
"is_anonymous": False,
}

View file

@ -41,6 +41,9 @@ def test_privileges():
assert isinstance(chat_member.can_promote_members, bool)
assert chat_member.can_promote_members == CHAT_MEMBER['can_promote_members']
assert isinstance(chat_member.can_manage_topics, bool)
assert chat_member.can_manage_topics == CHAT_MEMBER['can_manage_topics']
def test_int():
assert int(chat_member) == chat_member.user.id