Ver Fonte

some fixes

TheHamkerCat há 5 anos atrás
pai
commit
d9b879720b
2 ficheiros alterados com 14 adições e 7 exclusões
  1. 2 0
      README.md
  2. 12 7
      wbb/modules/sudoers.py

+ 2 - 0
README.md

@@ -8,9 +8,11 @@ Just Another Telegram Bot Written In Python Using Pyrogram.
 ## Requirements
 
 - Python 3.7 or higher.
+- Neofetch is needed for some modules.
 - A [Telegram API key](https://docs.pyrogram.org/intro/setup#api-keys).
 - A [Telegram bot token](https://t.me/botfather).
 
+
 ## Install Locally Or On A VPS
 
 ```sh

+ 12 - 7
wbb/modules/sudoers.py

@@ -3,6 +3,7 @@ import time
 from pyrogram import filters, types
 import speedtest
 import psutil
+from subprocess import check_output
 from wbb import app, SUDOERS, bot_start_time
 from wbb.utils import nekobin, formatter
 from wbb.utils.errors import capture_err
@@ -91,9 +92,9 @@ async def get_speedtest_result(_, message):
     j = speed.download()
     k = speed.upload()
     await m.edit(f'''
-```Download - {speed_convert(j)}
-Upload   - {speed_convert(k)}
-Latency  - {round((i["latency"]))} ms
+**Download:** {speed_convert(j)}
+**Upload:** {speed_convert(k)}
+**Latency:** {round((i["latency"]))} ms
 ```''')
 
 # Stats Module
@@ -104,10 +105,14 @@ async def bot_sys_stats():
     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}%''')
+    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}"
     return stats