From 7a123c2475111a3cede262dc3642c4a32bc929be Mon Sep 17 00:00:00 2001 From: levina <82658782+levina-lab@users.noreply.github.com> Date: Mon, 25 Oct 2021 15:31:27 +0700 Subject: [PATCH] unused --- program/sysinfo.py | 53 ---------------------------------------------- 1 file changed, 53 deletions(-) delete mode 100644 program/sysinfo.py diff --git a/program/sysinfo.py b/program/sysinfo.py deleted file mode 100644 index 9cc3959..0000000 --- a/program/sysinfo.py +++ /dev/null @@ -1,53 +0,0 @@ -# Copyright (C) 2021 Veez Project - -import platform -import re -import socket -import uuid - -import psutil -from pyrogram import Client, filters -from config import Veez -from helpers.decorators import sudo_users_only, humanbytes -from helpers.filters import command - - -# FETCH SYSINFO - -@Client.on_message(command(["sysinfo", f"sysinfo@{Veez.BOT_USERNAME}"]) & ~filters.edited) -@sudo_users_only -async def give_sysinfo(client, message): - splatform = platform.system() - platform_release = platform.release() - platform_version = platform.version() - architecture = platform.machine() - hostname = socket.gethostname() - ip_address = socket.gethostbyname(socket.gethostname()) - mac_address = ":".join(re.findall("..", "%012x" % uuid.getnode())) - processor = platform.processor() - ram = humanbytes(round(psutil.virtual_memory().total)) - cpu_freq = psutil.cpu_freq().current - if cpu_freq >= 1000: - cpu_freq = f"{round(cpu_freq / 1000, 2)}GHz" - else: - cpu_freq = f"{round(cpu_freq, 2)}MHz" - du = psutil.disk_usage(client.workdir) - psutil.disk_io_counters() - disk = f"{humanbytes(du.used)} / {humanbytes(du.total)} " f"({du.percent}%)" - cpu_len = len(psutil.Process().cpu_affinity()) - somsg = f"""**🖥 SYSTEM INFO** - -**PlatForm :** `{splatform}` -**PlatForm - Release :** `{platform_release}` -**PlatFork - Version :** `{platform_version}` -**Architecture :** `{architecture}` -**Hostname :** `{hostname}` -**IP :** `{ip_address}` -**Mac :** `{mac_address}` -**Processor :** `{processor}` -**Ram : ** `{ram}` -**CPU :** `{cpu_len}` -**CPU FREQ :** `{cpu_freq}` -**DISK :** `{disk}` - """ - await message.reply(somsg)