thehamkercat 5 vuotta sitten
vanhempi
sitoutus
7ef993654f
2 muutettua tiedostoa jossa 11 lisäystä ja 4 poistoa
  1. 2 2
      wbb/modules/chatbot.py
  2. 9 2
      wbb/modules/spam.py

+ 2 - 2
wbb/modules/chatbot.py

@@ -92,11 +92,11 @@ async def chatbot_talk(_, message):
     if message.reply_to_message.from_user.id != BOT_ID:
         return
     query = message.text
-    await app2.send_chat_action(message.chat.id, "typing")
+    await app.send_chat_action(message.chat.id, "typing")
     response = await lunaQuery(
         query, message.from_user.id if message.from_user else 0
     )
-    await app2.send_chat_action(message.chat.id, "cancel")
+    await app.send_chat_action(message.chat.id, "cancel")
     await message.reply_text(response)
 
 

+ 9 - 2
wbb/modules/spam.py

@@ -131,11 +131,18 @@ async def spam_p_callback(_, cq: CallbackQuery):
         text = text.replace(
             "Alerted", f"Deleted Message With {from_user.mention}'s Approval."
         )
-        return await cq.message.edit(text)
+        await cq.message.edit(text)
+        if cq.message.reply_to_message:
+            text = f"**ADMINS OF {chat_id} FLAGGED THIS MESSAGE AS SPAM**\n\n"
+            text += f"`{cq.message.reply_to_message.text.markdown}`\n\n__{dev_forward}__"
+            return await app.send_message(
+                LOG_GROUP_ID, text, disable_web_page_preview=True
+            )
+        return
 
     await cq.message.delete()
     if cq.message.reply_to_message:
-        text = f"**ADMINS OF {chat_id} FLAGGED THIS MESSAGE AS SPAM**\n\n"
+        text = f"**ADMINS OF {chat_id} FLAGGED THIS MESSAGE AS NOT SPAM**\n\n"
         text += f"`{cq.message.reply_to_message.text.markdown}`\n\n__{dev_forward}__"
         return await app.send_message(
             LOG_GROUP_ID, text, disable_web_page_preview=True