Skip to content

Commit f9ea45f

Browse files
committed
Fix restrict_chat and restrict_chat_member combined permissions
1 parent 997a3c1 commit f9ea45f

2 files changed

Lines changed: 6 additions & 10 deletions

File tree

pyrogram/client/methods/chats/restrict_chat.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,13 @@ def restrict_chat(
5252
5353
can_send_other_messages (``bool``, *optional*):
5454
Pass True, if the user can send animations, games, stickers and use inline bots,
55-
implies can_send_media_messages.
55+
implies can_send_messages.
5656
5757
can_add_web_page_previews (``bool``, *optional*):
58-
Pass True, if the user may add web page previews to their messages, implies can_send_media_messages.
58+
Pass True, if the user may add web page previews to their messages, implies can_send_messages.
5959
6060
can_send_polls (``bool``, *optional*):
61-
Pass True, if the user can send polls, implies can_send_media_messages.
61+
Pass True, if the user can send polls, implies can_send_messages.
6262
6363
can_change_info (``bool``, *optional*):
6464
Pass True, if the user can change the chat title, photo and other settings.
@@ -96,15 +96,13 @@ def restrict_chat(
9696

9797
if can_send_other_messages:
9898
send_messages = None
99-
send_media = None
10099
send_stickers = None
101100
send_gifs = None
102101
send_games = None
103102
send_inline = None
104103

105104
if can_add_web_page_previews:
106105
send_messages = None
107-
send_media = None
108106
embed_links = None
109107

110108
if can_send_polls:

pyrogram/client/methods/chats/restrict_chat_member.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,13 @@ def restrict_chat_member(
6565
6666
can_send_other_messages (``bool``, *optional*):
6767
Pass True, if the user can send animations, games, stickers and use inline bots,
68-
implies can_send_media_messages.
68+
implies can_send_messages.
6969
7070
can_add_web_page_previews (``bool``, *optional*):
71-
Pass True, if the user may add web page previews to their messages, implies can_send_media_messages.
71+
Pass True, if the user may add web page previews to their messages, implies can_send_messages.
7272
7373
can_send_polls (``bool``, *optional*):
74-
Pass True, if the user can send polls, implies can_send_media_messages.
74+
Pass True, if the user can send polls, implies can_send_messages.
7575
7676
can_change_info (``bool``, *optional*):
7777
Pass True, if the user can change the chat title, photo and other settings.
@@ -109,15 +109,13 @@ def restrict_chat_member(
109109

110110
if can_send_other_messages:
111111
send_messages = None
112-
send_media = None
113112
send_stickers = None
114113
send_gifs = None
115114
send_games = None
116115
send_inline = None
117116

118117
if can_add_web_page_previews:
119118
send_messages = None
120-
send_media = None
121119
embed_links = None
122120

123121
if can_send_polls:

0 commit comments

Comments
 (0)