TheHamkerCat 5 жил өмнө
parent
commit
c86aa6d7c1
2 өөрчлөгдсөн 3 нэмэгдсэн , 5 устгасан
  1. 2 4
      wbb/__init__.py
  2. 1 1
      wbb/__main__.py

+ 2 - 4
wbb/__init__.py

@@ -36,10 +36,6 @@ log = logging.getLogger()
 
 SUDOERS = SUDO_USERS_ID
 
-def init_sudo():
-    global SUDOERS
-    from wbb.utils.botinfo import USERBOT_ID
-    SUDOERS.append(USERBOT_ID)
 
 FERNET_ENCRYPTION_KEY = FERNET_ENCRYPTION_KEY
 WELCOME_DELAY_KICK_SEC = WELCOME_DELAY_KICK_SEC
@@ -60,6 +56,8 @@ app2 = Client(
     api_hash=API_HASH
 )
 
+with app2:
+    SUDOERS.append((app2.get_me()).id)
 
 # Mainbot client
 print("\nStarting Main Bot\n")

+ 1 - 1
wbb/__main__.py

@@ -4,7 +4,7 @@ import importlib
 import uvloop
 from pyrogram import filters, idle
 from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup
-from wbb import app, app2, init_sudo
+from wbb import app, app2
 from wbb.utils import get_info, paginate_modules
 from wbb.utils import botinfo
 from wbb.modules.sudoers import bot_sys_stats