2
0
mirror of https://github.com/pyrogram/pyrogram synced 2025-08-28 21:07:59 +00:00

Fix kick_chat_member docstrings and return type

This commit is contained in:
Dan 2019-01-04 23:15:57 +01:00
parent b8a3d02eef
commit 7e354b12bf

View File

@ -27,7 +27,7 @@ class KickChatMember(BaseClient):
def kick_chat_member(self,
chat_id: Union[int, str],
user_id: Union[int, str],
until_date: int = 0) -> "pyrogram.Message":
until_date: int = 0) -> Union["pyrogram.Message", bool]:
"""Use this method to kick a user from a group, a supergroup or a channel.
In the case of supergroups and channels, the user will not be able to return to the group on their own using
invite links, etc., unless unbanned first. You must be an administrator in the chat for this to work and must
@ -52,7 +52,7 @@ class KickChatMember(BaseClient):
considered to be banned forever. Defaults to 0 (ban forever).
Returns:
True on success.
On success, either True or a service :obj:`Message <pyrogram.Message>` will be returned (when applicable).
Raises:
:class:`Error <pyrogram.Error>` in case of a Telegram RPC error.
@ -93,3 +93,5 @@ class KickChatMember(BaseClient):
{i.id: i for i in r.users},
{i.id: i for i in r.chats}
)
else:
return True