Browse Source

Some more updates (#151)

* Locks Update for pyrogram

* Spoiler
ÁÑÑÍHÌLÅTØR SPÄRK 4 năm trước cách đây
mục cha
commit
126c7764f7
2 tập tin đã thay đổi với 16 bổ sung và 16 xóa
  1. 9 10
      wbb/modules/locks.py
  2. 7 6
      wbb/utils/constants.py

+ 9 - 10
wbb/modules/locks.py

@@ -52,11 +52,11 @@ incorrect_parameters = "Incorrect Parameters, Check Locks Section In Help."
 # If url lock is enabled/disabled for a chat
 data = {
     "messages": "can_send_messages",
-    "stickers": "can_send_stickers",
-    "gifs": "can_send_animations",
+    "stickers": "can_send_other_messages",
+    "gifs": "can_send_other_messages",
     "media": "can_send_media_messages",
-    "games": "can_send_games",
-    "inline": "can_use_inline_bots",
+    "games": "can_send_other_messages",
+    "inline": "can_send_other_messages",
     "url": "can_add_web_page_previews",
     "polls": "can_send_polls",
     "group_info": "can_change_info",
@@ -121,13 +121,12 @@ async def locks_func(_, message):
             ChatPermissions(
                 can_send_messages=True,
                 can_send_media_messages=True,
-                can_send_stickers=True,
-                can_send_animations=True,
-                can_invite_users=True,
-                can_send_games=True,
-                can_use_inline_bots=True,
-                can_send_polls=True,
+                can_send_other_messages=True,
                 can_add_web_page_previews=True,
+                can_send_polls=True,
+                can_change_info=True,
+                can_invite_users=True,
+                can_pin_messages=True,
             ),
         )
         await message.reply(f"Unlocked Everything in {message.chat.title}")

+ 7 - 6
wbb/utils/constants.py

@@ -18,12 +18,13 @@ NOTE: Fillings only works in greetings module.
 
 <u>Supported formatting:</u>
 
-<code>**Bold**</code> : Creates <b>bold</b> text.
-<code>~~strike~~</code>: Creates <strike>striked</strike> text.
-<code>__italic__</code>: Creates <i>italic</i> text.
-<code>--underline--</code>: Creates <u>underline</u> text.
-<code>`code words`</code>: Creates <code>code words</code> text.
-<code>[hyperlink](google.com)</code>: Creates <a href='https://www.google.com'>hyperlink</a> text.
+<code>**Bold**</code> : This will show as <b>bold</b> text.
+<code>~~strike~~</code>: This will show as <strike>strike</strike> text.
+<code>__italic__</code>: This will show as <i>italic</i> text.
+<code>--underline--</code>: This will show as <u>underline</u> text.
+<code>`code words`</code>: This will show as <code>code</code> text.
+<code>||spoiler||</code>: This will show as <spoiler>Spoiler</spoiler> text.
+<code>[hyperlink](google.com)</code>: This will create a <a href='https://www.google.com'>hyperlink</a> text.
 <b>Note:</b> You can use both markdown & html tags.