TheHamkerCat 5 éve
szülő
commit
ad4ab33e4c
3 módosított fájl, 15 hozzáadás és 6 törlés
  1. 1 1
      wbb/modules/misc.py
  2. 10 2
      wbb/modules/pmpermit.py
  3. 4 3
      wbb/modules/webss.py

+ 1 - 1
wbb/modules/misc.py

@@ -44,13 +44,13 @@ __HELP__ = """
 /encrypt - Encrypt Text [Can Only Be Decrypted By This Bot]
 /decrypt - Decrypt Text
 /cheat [Language] [Query] - Get Programming Related Help
-/weather [City] - To Get Weather Info
 /tr [en] - Translate A Message
 /json [URL] - Get JSON Response From An API or Something.
 /arq - Statistics Of ARQ API.
 /webss [URL] - Take A Screenshot Of A Webpage
 /reverse - Reverse search an image.
 /carbon - Make Carbon from code.
+/tts - Convert Text To Speech.
 #RTFM - Tell noobs to read the manual
 """
 

+ 10 - 2
wbb/modules/pmpermit.py

@@ -168,10 +168,18 @@ async def pmpermit_cq(_, cq):
         if user_id != USERBOT_ID:
             return await cq.answer("This Button Is Not For You")
         await approve_pmpermit(int(victim))
-        await app.edit_inline_text(
+        return await app.edit_inline_text(
             cq.inline_message_id, "User Has Been Approved To PM."
         )
-        return
+    
+    if data == "block":
+        if user_id != USERBOT_ID:
+            return await cq.answer("This Button Is Not For You")
+        await app.edit_inline_text(
+            cq.inline_message_id, "Successfully blocked the user."
+        )
+        return await app2.block_user(int(victim))
+
     if user_id == USERBOT_ID:
         return await cq.answer("It's For The Other Person.")
 

+ 4 - 3
wbb/modules/webss.py

@@ -25,6 +25,7 @@ from pyrogram import filters
 
 from wbb import app
 from wbb.core.decorators.errors import capture_err
+from pyrogram.types import Message
 
 __MODULE__ = "WebSS"
 __HELP__ = "/webss | .webss [URL] - Take A Screenshot Of A Webpage"
@@ -32,7 +33,7 @@ __HELP__ = "/webss | .webss [URL] - Take A Screenshot Of A Webpage"
 
 @app.on_message(filters.command("webss"))
 @capture_err
-async def take_ss(_, message):
+async def take_ss(_, message: Message):
     try:
         if len(message.command) != 2:
             return await message.reply_text(
@@ -42,9 +43,9 @@ async def take_ss(_, message):
         m = await message.reply_text("**Taking Screenshot**")
         await m.edit("**Uploading**")
         try:
-            await app.send_photo(
-                message.chat.id,
+            await message.reply_photo(
                 photo=f"https://webshot.amanoteam.com/print?q={url}",
+                quote=False,
             )
         except TypeError:
             return await m.edit("No Such Website.")