Browse Source

Verbose now

thehamkercat 5 năm trước cách đây
mục cha
commit
a046a1b2ff
5 tập tin đã thay đổi với 9 bổ sung và 5 xóa
  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
 SOFTWARE.
 """
+print("[INFO]: INITIALIZING")
 import asyncio
 import time
 from os import path
@@ -33,7 +34,6 @@ from pyromod import listen
 from Python_ARQ import ARQ
 from telegraph import Telegraph
 
-print("[INFO]: INITIALIZING")
 is_config = path.exists("config.py")
 if is_config:
     from config import *
@@ -70,6 +70,8 @@ async def load_sudoers():
                 {"sudo": "sudo"}, {"$set": {"sudoers": sudoers}}, upsert=True
             )
     SUDOERS = (SUDOERS + sudoers) if sudoers else SUDOERS
+    print("[INFO]: LOADED SUDOERS")
+
 
 
 loop = asyncio.get_event_loop()
@@ -142,6 +144,6 @@ print("[INFO]: STARTING USERBOT CLIENT")
 app2.start()
 print("[INFO]: LOADING UB/BOT PROFILE INFO")
 get_info(app, app2)
-
+print("[INFO]: LOADED UB/BOT PROFILE INFO")
 if USERBOT_ID not in SUDOERS:
     SUDOERS.append(USERBOT_ID)

+ 2 - 1
wbb/__main__.py

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

+ 1 - 1
wbb/modules/__init__.py

@@ -61,7 +61,7 @@ def __list_all_modules():
 
     return all_modules
 
-
+print("[INFO]: IMPORTING MODULES")
 importlib.import_module("wbb.modules.__main__")
 ALL_MODULES = sorted(__list_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:
         served_chats.append(int(chat["chat_id"]))
     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,
     )
     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)
             continue
         pipes_list_userbot.append(pipe)
+    print("[INFO]: LOADED PIPES")
 
 
 loop = asyncio.get_running_loop()