|
@@ -25,7 +25,7 @@ from pyrogram import filters
|
|
|
from pyrogram.types import (CallbackQuery, InlineKeyboardButton,
|
|
from pyrogram.types import (CallbackQuery, InlineKeyboardButton,
|
|
|
InlineKeyboardMarkup, Message)
|
|
InlineKeyboardMarkup, Message)
|
|
|
|
|
|
|
|
-from wbb import LOG_GROUP_ID, SUDOERS, app, app2, arq, USERBOT_PREFIX
|
|
|
|
|
|
|
+from wbb import LOG_GROUP_ID, SUDOERS, USERBOT_PREFIX, app, app2, arq
|
|
|
from wbb.core.decorators.permissions import adminsOnly
|
|
from wbb.core.decorators.permissions import adminsOnly
|
|
|
from wbb.modules.admin import list_admins, member_permissions
|
|
from wbb.modules.admin import list_admins, member_permissions
|
|
|
from wbb.modules.trust import get_spam_data
|
|
from wbb.modules.trust import get_spam_data
|
|
@@ -214,15 +214,21 @@ async def spam_toggle(_, message: Message):
|
|
|
"Unknown Suffix, Use /spam_detection [ENABLE|DISABLE]"
|
|
"Unknown Suffix, Use /spam_detection [ENABLE|DISABLE]"
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
|
|
+
|
|
|
@app.on_message(filters.command("spam_scan"))
|
|
@app.on_message(filters.command("spam_scan"))
|
|
|
-@app2.on_message(filters.command("spam_scan", prefixes=USERBOT_PREFIX) & filters.user(SUDOERS))
|
|
|
|
|
|
|
+@app2.on_message(
|
|
|
|
|
+ filters.command("spam_scan", prefixes=USERBOT_PREFIX)
|
|
|
|
|
+ & filters.user(SUDOERS)
|
|
|
|
|
+)
|
|
|
async def scanNLP(_, message: Message):
|
|
async def scanNLP(_, message: Message):
|
|
|
if not message.reply_to_message:
|
|
if not message.reply_to_message:
|
|
|
- return await edit_or_reply(message, text="Reply to a message to scan it.")
|
|
|
|
|
|
|
+ return await edit_or_reply(
|
|
|
|
|
+ message, text="Reply to a message to scan it."
|
|
|
|
|
+ )
|
|
|
r = message.reply_to_message
|
|
r = message.reply_to_message
|
|
|
text = r.text or r.caption
|
|
text = r.text or r.caption
|
|
|
if not text:
|
|
if not text:
|
|
|
- return await edit_or_reply(message, text="Can't scan that")
|
|
|
|
|
|
|
+ return await edit_or_reply(message, text="Can't scan that")
|
|
|
data = await arq.nlp(text)
|
|
data = await arq.nlp(text)
|
|
|
data = data.result[0]
|
|
data = data.result[0]
|
|
|
msg = f"""
|
|
msg = f"""
|