From 59ccc4de8880ce540849d4a18ae5334b80392b6b Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Sun, 24 Apr 2022 11:56:07 +0200 Subject: [PATCH] Documentation fixes --- pyrogram/filters.py | 4 ++-- pyrogram/methods/bots/get_chat_menu_button.py | 7 ++++--- pyrogram/methods/bots/set_chat_menu_button.py | 13 +++++++------ pyrogram/types/user_and_chats/chat_event_filter.py | 10 +++++----- pyrogram/types/user_and_chats/chat_privileges.py | 2 +- 5 files changed, 19 insertions(+), 17 deletions(-) diff --git a/pyrogram/filters.py b/pyrogram/filters.py index 013adee4..76bff856 100644 --- a/pyrogram/filters.py +++ b/pyrogram/filters.py @@ -642,7 +642,7 @@ async def video_chat_started_filter(_, __, m: Message): video_chat_started = create(video_chat_started_filter) -"""Filter messages for started voice chats""" +"""Filter messages for started video chats""" # endregion @@ -653,7 +653,7 @@ async def video_chat_ended_filter(_, __, m: Message): video_chat_ended = create(video_chat_ended_filter) -"""Filter messages for ended voice chats""" +"""Filter messages for ended video chats""" # endregion diff --git a/pyrogram/methods/bots/get_chat_menu_button.py b/pyrogram/methods/bots/get_chat_menu_button.py index ec1c7ed2..8fb61b01 100644 --- a/pyrogram/methods/bots/get_chat_menu_button.py +++ b/pyrogram/methods/bots/get_chat_menu_button.py @@ -30,9 +30,10 @@ class GetChatMenuButton: ) -> "types.MenuButton": """Get the current value of the bot's menu button in a private chat, or the default menu button. - chat_id (``int`` | ``str``): - Unique identifier (int) or username (str) of the target chat. - If not specified, default bot's menu button will be returned. + Parameters: + chat_id (``int`` | ``str``): + Unique identifier (int) or username (str) of the target chat. + If not specified, default bot's menu button will be returned. """ if chat_id: diff --git a/pyrogram/methods/bots/set_chat_menu_button.py b/pyrogram/methods/bots/set_chat_menu_button.py index 1305c495..87e26c03 100644 --- a/pyrogram/methods/bots/set_chat_menu_button.py +++ b/pyrogram/methods/bots/set_chat_menu_button.py @@ -31,13 +31,14 @@ class SetChatMenuButton: ) -> bool: """Change the bot's menu button in a private chat, or the default menu button. - chat_id (``int`` | ``str``, *optional*): - Unique identifier (int) or username (str) of the target chat. - If not specified, default bot's menu button will be changed. + Parameters: + chat_id (``int`` | ``str``, *optional*): + Unique identifier (int) or username (str) of the target chat. + If not specified, default bot's menu button will be changed. - menu_button (:obj:`~pyrogram.types.MenuButton`, *optional*): - The new bot's menu button. - Defaults to :obj:`~pyrogram.types.MenuButtonDefault`. + menu_button (:obj:`~pyrogram.types.MenuButton`, *optional*): + The new bot's menu button. + Defaults to :obj:`~pyrogram.types.MenuButtonDefault`. """ await self.invoke( diff --git a/pyrogram/types/user_and_chats/chat_event_filter.py b/pyrogram/types/user_and_chats/chat_event_filter.py index 7edc3a07..92298ea3 100644 --- a/pyrogram/types/user_and_chats/chat_event_filter.py +++ b/pyrogram/types/user_and_chats/chat_event_filter.py @@ -66,8 +66,8 @@ class ChatEventFilter(Object): True, if members leaving events should be returned. Defaults to False. - voice_chats (``bool``, *optional*): - True, if voice chats events should be returned. + video_chats (``bool``, *optional*): + True, if video chats events should be returned. Defaults to False. """ @@ -83,7 +83,7 @@ class ChatEventFilter(Object): edited_messages: bool = False, pinned_messages: bool = False, leaving_members: bool = False, - voice_chats: bool = False + video_chats: bool = False ): super().__init__() @@ -97,7 +97,7 @@ class ChatEventFilter(Object): self.edited_messages = edited_messages self.pinned_messages = pinned_messages self.leaving_members = leaving_members - self.voice_chats = voice_chats + self.video_chats = video_chats def write(self) -> "raw.base.ChannelAdminLogEventsFilter": join = False @@ -152,7 +152,7 @@ class ChatEventFilter(Object): if self.leaving_members: leave = True - if self.voice_chats: + if self.video_chats: group_call = True return raw.types.ChannelAdminLogEventsFilter( diff --git a/pyrogram/types/user_and_chats/chat_privileges.py b/pyrogram/types/user_and_chats/chat_privileges.py index 8a420da5..09bb341d 100644 --- a/pyrogram/types/user_and_chats/chat_privileges.py +++ b/pyrogram/types/user_and_chats/chat_privileges.py @@ -34,7 +34,7 @@ class ChatPrivileges(Object): can_manage_video_chats (``bool``, *optional*): Groups and supergroups only. - True, if the administrator can manage voice chats (also called group calls). + True, if the administrator can manage video chats (also called group calls). can_restrict_members (``bool``, *optional*): True, if the administrator can restrict, ban or unban chat members.