mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-29 05:18:10 +00:00
Fix kick_chat_member docstrings and return type
This commit is contained in:
parent
b8a3d02eef
commit
7e354b12bf
@ -27,7 +27,7 @@ class KickChatMember(BaseClient):
|
|||||||
def kick_chat_member(self,
|
def kick_chat_member(self,
|
||||||
chat_id: Union[int, str],
|
chat_id: Union[int, str],
|
||||||
user_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.
|
"""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
|
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
|
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).
|
considered to be banned forever. Defaults to 0 (ban forever).
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
True on success.
|
On success, either True or a service :obj:`Message <pyrogram.Message>` will be returned (when applicable).
|
||||||
|
|
||||||
Raises:
|
Raises:
|
||||||
:class:`Error <pyrogram.Error>` in case of a Telegram RPC error.
|
: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.users},
|
||||||
{i.id: i for i in r.chats}
|
{i.id: i for i in r.chats}
|
||||||
)
|
)
|
||||||
|
else:
|
||||||
|
return True
|
||||||
|
Loading…
x
Reference in New Issue
Block a user