Skip to content

Commit 7a95c87

Browse files
authored
Remove "All Members Are Admins" Note and formatting
1 parent 482a99e commit 7a95c87

1 file changed

Lines changed: 5 additions & 13 deletions

File tree

pyrogram/methods/chats/ban_chat_member.py

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,28 +20,21 @@
2020
from typing import Union
2121

2222
import pyrogram
23-
from pyrogram import raw, utils
24-
from pyrogram import types
23+
from pyrogram import raw, types, utils
2524

2625

2726
class BanChatMember:
2827
async def ban_chat_member(
2928
self: "pyrogram.Client",
3029
chat_id: Union[int, str],
3130
user_id: Union[int, str],
32-
until_date: datetime = utils.zero_datetime()
31+
until_date: datetime = utils.zero_datetime(),
3332
) -> Union["types.Message", bool]:
3433
"""Ban a user from a group, a supergroup or a channel.
3534
In the case of supergroups and channels, the user will not be able to return to the group on their own using
3635
invite links, etc., unless unbanned first. You must be an administrator in the chat for this to work and must
3736
have the appropriate admin rights.
3837
39-
.. note::
40-
41-
In regular groups (non-supergroups), this method will only work if the "All Members Are Admins" setting is
42-
off in the target group. Otherwise members may only be removed by the group's creator or by the member
43-
that added them.
44-
4538
.. include:: /_includes/usable-by/users-bots.rst
4639
4740
Parameters:
@@ -89,15 +82,14 @@ async def ban_chat_member(
8982
send_gifs=True,
9083
send_games=True,
9184
send_inline=True,
92-
embed_links=True
93-
)
85+
embed_links=True,
86+
),
9487
)
9588
)
9689
else:
9790
r = await self.invoke(
9891
raw.functions.messages.DeleteChatUser(
99-
chat_id=abs(chat_id),
100-
user_id=user_peer
92+
chat_id=abs(chat_id), user_id=user_peer
10193
)
10294
)
10395

0 commit comments

Comments
 (0)