thehamkercat vor 5 Jahren
Ursprung
Commit
822dabc57c
3 geänderte Dateien mit 4 neuen und 4 gelöschten Zeilen
  1. 2 2
      wbb/modules/admin.py
  2. 1 1
      wbb/modules/taglogger.py
  3. 1 1
      wbb/utils/dbfunctions.py

+ 2 - 2
wbb/modules/admin.py

@@ -194,9 +194,9 @@ async def kick(_, message):
         if user_id in SUDOERS:
             await message.reply_text("You Wanna Kick The Elevated One?")
         else:
-            await message.reply_to_message.chat.kick_member(user_id)
+            await message.chat.kick_member(user_id)
             await asyncio.sleep(1)
-            await message.reply_to_message.chat.unban_member(user_id)
+            await message.chat.unban_member(user_id)
             await message.reply_text("Kicked!")
     except Exception as e:
         await message.reply_text(str(e))

+ 1 - 1
wbb/modules/taglogger.py

@@ -31,7 +31,7 @@ async def statusUpdaterFunc(_, update):
 async def sendLog(message: Message):
     msg = f"""
 **User:** {message.from_user.mention} [`{message.from_user.id if message.from_user else None}`]
-**Text:** {message.text if message.text else None}
+**Text:** {message.text if message.text else message.caption if message.caption else None}
 **Chat:** {message.chat.title} [`{message.chat.id}`]
 **Bot:** {message.from_user.is_bot}
 """

+ 1 - 1
wbb/utils/dbfunctions.py

@@ -541,7 +541,7 @@ async def get_captcha_cache():
 async def get_blacklist_filters_count() -> dict:
     chats = blacklist_filtersdb.find({"chat_id": {"$lt": 0}})
     if not chats:
-        return {}
+        return {"chats_count": 0, "filters_count": 0}
     chats_count = 0
     filters_count = 0
     for chat in await chats.to_list(length=1000000000):