thehamkercat 5 лет назад
Родитель
Сommit
a046a1b2ff
5 измененных файлов с 9 добавлено и 5 удалено
  1. 4 2
      wbb/__init__.py
  2. 2 1
      wbb/__main__.py
  3. 1 1
      wbb/modules/__init__.py
  4. 1 1
      wbb/modules/global_stats.py
  5. 1 0
      wbb/modules/pipes.py

+ 4 - 2
wbb/__init__.py

@@ -22,6 +22,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 SOFTWARE.
 SOFTWARE.
 """
 """
+print("[INFO]: INITIALIZING")
 import asyncio
 import asyncio
 import time
 import time
 from os import path
 from os import path
@@ -33,7 +34,6 @@ from pyromod import listen
 from Python_ARQ import ARQ
 from Python_ARQ import ARQ
 from telegraph import Telegraph
 from telegraph import Telegraph
 
 
-print("[INFO]: INITIALIZING")
 is_config = path.exists("config.py")
 is_config = path.exists("config.py")
 if is_config:
 if is_config:
     from config import *
     from config import *
@@ -70,6 +70,8 @@ async def load_sudoers():
                 {"sudo": "sudo"}, {"$set": {"sudoers": sudoers}}, upsert=True
                 {"sudo": "sudo"}, {"$set": {"sudoers": sudoers}}, upsert=True
             )
             )
     SUDOERS = (SUDOERS + sudoers) if sudoers else SUDOERS
     SUDOERS = (SUDOERS + sudoers) if sudoers else SUDOERS
+    print("[INFO]: LOADED SUDOERS")
+
 
 
 
 
 loop = asyncio.get_event_loop()
 loop = asyncio.get_event_loop()
@@ -142,6 +144,6 @@ print("[INFO]: STARTING USERBOT CLIENT")
 app2.start()
 app2.start()
 print("[INFO]: LOADING UB/BOT PROFILE INFO")
 print("[INFO]: LOADING UB/BOT PROFILE INFO")
 get_info(app, app2)
 get_info(app, app2)
-
+print("[INFO]: LOADED UB/BOT PROFILE INFO")
 if USERBOT_ID not in SUDOERS:
 if USERBOT_ID not in SUDOERS:
     SUDOERS.append(USERBOT_ID)
     SUDOERS.append(USERBOT_ID)

+ 2 - 1
wbb/__main__.py

@@ -43,6 +43,7 @@ HELPABLE = {}
 async def start_bot():
 async def start_bot():
     restart_data = await clean_restart_stage()
     restart_data = await clean_restart_stage()
     if restart_data:
     if restart_data:
+        print("[INFO]: SENDING RESTART STATUS")
         try:
         try:
             await app.edit_message_text(
             await app.edit_message_text(
                 restart_data["chat_id"],
                 restart_data["chat_id"],
@@ -51,7 +52,6 @@ async def start_bot():
             )
             )
         except Exception:
         except Exception:
             pass
             pass
-
     for module in ALL_MODULES:
     for module in ALL_MODULES:
         imported_module = importlib.import_module("wbb.modules." + module)
         imported_module = importlib.import_module("wbb.modules." + module)
         if (
         if (
@@ -81,6 +81,7 @@ async def start_bot():
     print(f"[INFO]: BOT STARTED AS {BOT_NAME}!")
     print(f"[INFO]: BOT STARTED AS {BOT_NAME}!")
     print(f"[INFO]: USERBOT STARTED AS {USERBOT_NAME}!")
     print(f"[INFO]: USERBOT STARTED AS {USERBOT_NAME}!")
     await idle()
     await idle()
+    print("[INFO]: STOPPING BOT AND CLOSING AIOHTTP SESSION")
     await aiohttpsession.close()
     await aiohttpsession.close()
 
 
 
 

+ 1 - 1
wbb/modules/__init__.py

@@ -61,7 +61,7 @@ def __list_all_modules():
 
 
     return all_modules
     return all_modules
 
 
-
+print("[INFO]: IMPORTING MODULES")
 importlib.import_module("wbb.modules.__main__")
 importlib.import_module("wbb.modules.__main__")
 ALL_MODULES = sorted(__list_all_modules())
 ALL_MODULES = sorted(__list_all_modules())
 __all__ = ALL_MODULES + ["ALL_MODULES"]
 __all__ = ALL_MODULES + ["ALL_MODULES"]

+ 1 - 1
wbb/modules/global_stats.py

@@ -56,7 +56,7 @@ async def global_stats(_, message):
     for chat in chats:
     for chat in chats:
         served_chats.append(int(chat["chat_id"]))
         served_chats.append(int(chat["chat_id"]))
     await m.edit(
     await m.edit(
-        f"__**Generating Statistics Report, Should Take {len(served_chats)*6}+ Seconds.**__",
+        f"__**Generating Statistics Report, Should Take {len(served_chats)*2}+ Seconds.**__",
         disable_web_page_preview=True,
         disable_web_page_preview=True,
     )
     )
     for served_chat in served_chats:
     for served_chat in served_chats:

+ 1 - 0
wbb/modules/pipes.py

@@ -71,6 +71,7 @@ async def load_pipes():
             pipes_list_bot.append(pipe)
             pipes_list_bot.append(pipe)
             continue
             continue
         pipes_list_userbot.append(pipe)
         pipes_list_userbot.append(pipe)
+    print("[INFO]: LOADED PIPES")
 
 
 
 
 loop = asyncio.get_running_loop()
 loop = asyncio.get_running_loop()