File tree Expand file tree Collapse file tree
pyrogram/types/user_and_chats Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1496,9 +1496,7 @@ async def set_ttl(self, ttl_seconds: int) -> "types.Message":
14961496 )
14971497
14981498 async def ban_member (
1499- self ,
1500- user_id : Union [int , str ],
1501- until_date : datetime = utils .zero_datetime ()
1499+ self , user_id : Union [int , str ], until_date : datetime = utils .zero_datetime ()
15021500 ) -> Union ["types.Message" , bool ]:
15031501 """Bound method *ban_member* of :obj:`~pyrogram.types.Chat`.
15041502
@@ -1516,12 +1514,6 @@ async def ban_member(
15161514
15171515 await chat.ban_member(123456789)
15181516
1519- .. note::
1520-
1521- In regular groups (non-supergroups), this method will only work if the "All Members Are Admins" setting is
1522- off in the target group. Otherwise members may only be removed by the group's creator or by the member
1523- that added them.
1524-
15251517 Parameters:
15261518 user_id (``int`` | ``str``):
15271519 Unique identifier (int) or username (str) of the target user.
@@ -1540,9 +1532,7 @@ async def ban_member(
15401532 RPCError: In case of a Telegram RPC error.
15411533 """
15421534 return await self ._client .ban_chat_member (
1543- chat_id = self .id ,
1544- user_id = user_id ,
1545- until_date = until_date
1535+ chat_id = self .id , user_id = user_id , until_date = until_date
15461536 )
15471537
15481538 async def unban_member (
You can’t perform that action at this time.
0 commit comments