Parcourir la source

Merge branch 'dev' of https://github.com/thehamkercat/WilliamButcherBot into dev

TheHamkerCat il y a 5 ans
Parent
commit
9a24dee826
1 fichiers modifiés avec 2 ajouts et 3 suppressions
  1. 2 3
      wbb/modules/global_stats.py

+ 2 - 3
wbb/modules/global_stats.py

@@ -15,7 +15,6 @@ from wbb.utils.dbfunctions import (
         get_gbans_count
         )
 from pyrogram import filters
-from pyrogram.errors.exceptions.bad_request_400 import UserNotParticipant, PeerIdInvalid
 
 @app.on_message(filters.text, group=global_stats_group)
 @capture_err
@@ -45,9 +44,9 @@ async def global_stats(_, message):
         served_chats.append(int(chat["chat_id"]))
     for served_chat in served_chats:
         try:
-            await app.get_chat_member(served_chat, BOT_ID)
+            await app.get_chat_members(served_chat, BOT_ID)
         except Exception as e:
-            print(e)
+            print(f"{e} - {served_chat}")
             await remove_served_chat(served_chat)
             served_chats.remove(served_chat)
             pass