TheHamkerCat пре 5 година
родитељ
комит
830e943953
3 измењених фајлова са 16 додато и 14 уклоњено
  1. 5 4
      wbb/modules/antiservice.py
  2. 10 10
      wbb/modules/inline.py
  3. 1 0
      wbb/utils/dbfunctions.py

+ 5 - 4
wbb/modules/antiservice.py

@@ -7,12 +7,13 @@ from wbb.modules.admin import member_permissions
 from wbb.utils.dbfunctions import is_antiservice_on, antiservice_on, antiservice_off
 
 __MODULE__ = "AntiService"
-__HELP__ = f"""
-Plugin to delete antiservice messages in a chat!
+__HELP__ = """
+Plugin to delete service messages in a chat!
 
 /antiservice [enable|disable]
 """
 
+
 @app.on_message(filters.command("antiservice") & ~filters.private)
 async def anti_service(_, message):
     if len(message.command) != 2:
@@ -36,7 +37,6 @@ async def anti_service(_, message):
         await message.reply_text("Unknown Suffix, Use /antiservice [enable|disable]")
 
 
-
 @app.on_message(filters.service, group=11)
 async def delete_service(_, message):
     chat_id = message.chat.id
@@ -44,5 +44,6 @@ async def delete_service(_, message):
         if await is_antiservice_on(chat_id):
             await message.delete()
             return
-    except:
+    except Exception as e:
+        print(e)
         pass

+ 10 - 10
wbb/modules/inline.py

@@ -1,10 +1,10 @@
 from wbb import app
 from wbb.utils.inlinefuncs import (
-        google_search_func, urban_func, translate_func,
-        alive_function, webss, shortify, wall_func,
-        saavn_func, deezer_func, inline_help_func,
-        torrent_func
-        )
+    google_search_func, urban_func, translate_func,
+    alive_function, webss, shortify, wall_func,
+    saavn_func, deezer_func, inline_help_func,
+    torrent_func
+)
 from pyrogram import filters
 
 __MODULE__ = "Inline"
@@ -34,10 +34,10 @@ async def inline_query_handler(client, query):
         if text.strip() == '':
             answerss = await inline_help_func(__HELP__)
             await client.answer_inline_query(
-                    query.id,
-                    results=answerss,
-                    cache_time=10
-                    )
+                query.id,
+                results=answerss,
+                cache_time=10
+            )
             return
         elif text.split()[0] == "alive":
             answerss = await alive_function(answers)
@@ -111,7 +111,7 @@ async def inline_query_handler(client, query):
                 query.id,
                 results=answerss
             )
-        
+
         elif text.split()[0] == "torrent":
             tex = text.split(None, 1)[1]
             answerss = await torrent_func(answers, tex)

+ 1 - 0
wbb/utils/dbfunctions.py

@@ -426,6 +426,7 @@ async def captcha_off(chat_id: int):
 
 """Anti Service System"""
 
+
 async def is_antiservice_on(chat_id: int) -> bool:
     chat = await antiservicedb.find_one({"chat_id": chat_id})
     if not chat: