|
@@ -85,18 +85,24 @@ Latency - {round((x["latency"]))} ms
|
|
|
|
|
|
|
|
@app.on_message(filters.user(OWNER_ID) & cust_filter.command(commands=(["stats"])))
|
|
@app.on_message(filters.user(OWNER_ID) & cust_filter.command(commands=(["stats"])))
|
|
|
async def stats(client, message):
|
|
async def stats(client, message):
|
|
|
- neofetch = os.system("neofetch --stdout")
|
|
|
|
|
|
|
+ os.system("neofetch --stdout > neofetch.txt")
|
|
|
|
|
+ f = open("neofetch.txt", "r")
|
|
|
|
|
+ neofetch = f.read()
|
|
|
|
|
+ f.close()
|
|
|
cpu = psutil.cpu_percent(interval=0.5)
|
|
cpu = psutil.cpu_percent(interval=0.5)
|
|
|
mem = psutil.virtual_memory().percent
|
|
mem = psutil.virtual_memory().percent
|
|
|
disk = psutil.disk_usage("/").percent
|
|
disk = psutil.disk_usage("/").percent
|
|
|
stats = (f'''
|
|
stats = (f'''
|
|
|
-```#####-Stats-#####
|
|
|
|
|
|
|
+```#####- [Stats] -#####
|
|
|
|
|
+
|
|
|
Uptime: {formater.get_readable_time((time.time() - bot_start_time))}
|
|
Uptime: {formater.get_readable_time((time.time() - bot_start_time))}
|
|
|
CPU: {cpu}%
|
|
CPU: {cpu}%
|
|
|
RAM: {mem}%
|
|
RAM: {mem}%
|
|
|
Disk: {disk}%
|
|
Disk: {disk}%
|
|
|
|
|
|
|
|
-####-Neofetch-####
|
|
|
|
|
|
|
+
|
|
|
|
|
+####- [Neofetch] -####
|
|
|
|
|
+
|
|
|
{neofetch}
|
|
{neofetch}
|
|
|
```''')
|
|
```''')
|
|
|
await message.reply_text(stats)
|
|
await message.reply_text(stats)
|