Sfoglia il codice sorgente

Final commit of today

TheHamkerCat 5 anni fa
parent
commit
136ccdc20a
2 ha cambiato i file con 15 aggiunte e 14 eliminazioni
  1. 6 1
      wbb/__main__.py
  2. 9 13
      wbb/modules/sudoers.py

+ 6 - 1
wbb/__main__.py

@@ -89,7 +89,12 @@ async def help_command(_, message):
                 [
                     InlineKeyboardButton(
                         text="System Stats",
-                        callback_data="stats_callback")
+                        callback_data="stats_callback"
+                    ),
+                    InlineKeyboardButton(
+                        text="Support",
+                        url="t.me/PatheticProgrammers"
+                    )
                 ]
             ]
         )

+ 9 - 13
wbb/modules/sudoers.py

@@ -101,22 +101,18 @@ async def get_speedtest_result(_, message):
 
 
 async def bot_sys_stats():
-#    bot_uptime = int(time.time() - bot_start_time)
-#    cpu = psutil.cpu_percent(interval=0.5)
-#    mem = psutil.virtual_memory().percent
-#    disk = psutil.disk_usage("/").percent
-#    stats = f'''
-#Uptime: {formatter.get_readable_time((bot_uptime))}
-#CPU: {cpu}%
-#RAM: {mem}%
-#Disk: {disk}%'''
-    neofetch = check_output(["neofetch", "--stdout"])
-    neofetch = neofetch.decode("UTF-8")
-    stats = f"\nNEOFETCH\n{neofetch}"
+    bot_uptime = int(time.time() - bot_start_time)
+    cpu = psutil.cpu_percent(interval=0.5)
+    mem = psutil.virtual_memory().percent
+    disk = psutil.disk_usage("/").percent
+    stats = f'''
+Uptime: {formatter.get_readable_time((bot_uptime))}
+CPU: {cpu}%
+RAM: {mem}%
+Disk: {disk}%'''
     return stats
 
 
-
 @app.on_message(
     filters.user(SUDOERS) & filters.command("stats")
 )