From 7a814e7c7e075bffeef4b0740b701fd67e75da9a Mon Sep 17 00:00:00 2001 From: jigsaw Date: Sat, 18 Nov 2023 22:43:50 +0800 Subject: [PATCH] :alien: Telegram Bot API 6.9 --- nonebot/adapters/telegram/api.py | 7 +++++-- nonebot/adapters/telegram/model.py | 8 ++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/nonebot/adapters/telegram/api.py b/nonebot/adapters/telegram/api.py index 90da637..0356415 100644 --- a/nonebot/adapters/telegram/api.py +++ b/nonebot/adapters/telegram/api.py @@ -518,15 +518,18 @@ async def promote_chat_member( user_id: int, is_anonymous: Optional[bool] = None, can_manage_chat: Optional[bool] = None, - can_post_messages: Optional[bool] = None, - can_edit_messages: Optional[bool] = None, can_delete_messages: Optional[bool] = None, can_manage_video_chats: Optional[bool] = None, can_restrict_members: Optional[bool] = None, can_promote_members: Optional[bool] = None, can_change_info: Optional[bool] = None, can_invite_users: Optional[bool] = None, + can_post_messages: Optional[bool] = None, + can_edit_messages: Optional[bool] = None, can_pin_messages: Optional[bool] = None, + can_post_stories: Optional[bool] = None, + can_edit_stories: Optional[bool] = None, + can_delete_stories: Optional[bool] = None, can_manage_topics: Optional[bool] = None, ) -> Literal[True]: ... diff --git a/nonebot/adapters/telegram/model.py b/nonebot/adapters/telegram/model.py index e7da1ea..02deb63 100644 --- a/nonebot/adapters/telegram/model.py +++ b/nonebot/adapters/telegram/model.py @@ -440,7 +440,9 @@ class ChatShared(BaseModel): class WriteAccessAllowed(BaseModel): + from_request: Optional[bool] = None web_app_name: Optional[str] = None + from_attachment_menu: Optional[bool] = None class VideoChatScheduled(BaseModel): @@ -599,6 +601,9 @@ class ChatAdministratorRights(BaseModel): can_post_messages: Optional[bool] = None can_edit_messages: Optional[bool] = None can_pin_messages: Optional[bool] = None + can_post_stories: Optional[bool] = None + can_edit_stories: Optional[bool] = None + can_delete_stories: Optional[bool] = None can_manage_topics: Optional[bool] = None @@ -627,6 +632,9 @@ class ChatMemberAdministrator(ChatMember): can_post_messages: Optional[bool] = None can_edit_messages: Optional[bool] = None can_pin_messages: Optional[bool] = None + can_post_stories: Optional[bool] = None + can_edit_stories: Optional[bool] = None + can_delete_stories: Optional[bool] = None can_manage_topics: Optional[bool] = None custom_title: Optional[str] = None