Documentation fixes

This commit is contained in:
Dan 2022-04-24 11:56:07 +02:00
parent ccadabca4a
commit 59ccc4de88
5 changed files with 19 additions and 17 deletions

View File

@ -642,7 +642,7 @@ async def video_chat_started_filter(_, __, m: Message):
video_chat_started = create(video_chat_started_filter) video_chat_started = create(video_chat_started_filter)
"""Filter messages for started voice chats""" """Filter messages for started video chats"""
# endregion # endregion
@ -653,7 +653,7 @@ async def video_chat_ended_filter(_, __, m: Message):
video_chat_ended = create(video_chat_ended_filter) video_chat_ended = create(video_chat_ended_filter)
"""Filter messages for ended voice chats""" """Filter messages for ended video chats"""
# endregion # endregion

View File

@ -30,6 +30,7 @@ class GetChatMenuButton:
) -> "types.MenuButton": ) -> "types.MenuButton":
"""Get the current value of the bot's menu button in a private chat, or the default menu button. """Get the current value of the bot's menu button in a private chat, or the default menu button.
Parameters:
chat_id (``int`` | ``str``): chat_id (``int`` | ``str``):
Unique identifier (int) or username (str) of the target chat. Unique identifier (int) or username (str) of the target chat.
If not specified, default bot's menu button will be returned. If not specified, default bot's menu button will be returned.

View File

@ -31,6 +31,7 @@ class SetChatMenuButton:
) -> bool: ) -> bool:
"""Change the bot's menu button in a private chat, or the default menu button. """Change the bot's menu button in a private chat, or the default menu button.
Parameters:
chat_id (``int`` | ``str``, *optional*): chat_id (``int`` | ``str``, *optional*):
Unique identifier (int) or username (str) of the target chat. Unique identifier (int) or username (str) of the target chat.
If not specified, default bot's menu button will be changed. If not specified, default bot's menu button will be changed.

View File

@ -66,8 +66,8 @@ class ChatEventFilter(Object):
True, if members leaving events should be returned. True, if members leaving events should be returned.
Defaults to False. Defaults to False.
voice_chats (``bool``, *optional*): video_chats (``bool``, *optional*):
True, if voice chats events should be returned. True, if video chats events should be returned.
Defaults to False. Defaults to False.
""" """
@ -83,7 +83,7 @@ class ChatEventFilter(Object):
edited_messages: bool = False, edited_messages: bool = False,
pinned_messages: bool = False, pinned_messages: bool = False,
leaving_members: bool = False, leaving_members: bool = False,
voice_chats: bool = False video_chats: bool = False
): ):
super().__init__() super().__init__()
@ -97,7 +97,7 @@ class ChatEventFilter(Object):
self.edited_messages = edited_messages self.edited_messages = edited_messages
self.pinned_messages = pinned_messages self.pinned_messages = pinned_messages
self.leaving_members = leaving_members self.leaving_members = leaving_members
self.voice_chats = voice_chats self.video_chats = video_chats
def write(self) -> "raw.base.ChannelAdminLogEventsFilter": def write(self) -> "raw.base.ChannelAdminLogEventsFilter":
join = False join = False
@ -152,7 +152,7 @@ class ChatEventFilter(Object):
if self.leaving_members: if self.leaving_members:
leave = True leave = True
if self.voice_chats: if self.video_chats:
group_call = True group_call = True
return raw.types.ChannelAdminLogEventsFilter( return raw.types.ChannelAdminLogEventsFilter(

View File

@ -34,7 +34,7 @@ class ChatPrivileges(Object):
can_manage_video_chats (``bool``, *optional*): can_manage_video_chats (``bool``, *optional*):
Groups and supergroups only. 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*): can_restrict_members (``bool``, *optional*):
True, if the administrator can restrict, ban or unban chat members. True, if the administrator can restrict, ban or unban chat members.