sysinfo.py upgraded

This commit is contained in:
esef committed 2026-06-06 12:19:11 +03:00
1 parent aa7a2eb855
commit 086f4ce912
2 files changed
+79 -1

No files matched your search

+10 -1
View File
@@ -92,6 +92,15 @@
"detail": "re",
"documentation": {}
},
{
"label": "psutil",
"kind": 6,
"isExtraImport": true,
"importPath": "psutil",
"description": "psutil",
"detail": "psutil",
"documentation": {}
},
{
"label": "load_dotenv",
"importPath": "dotenv",
@@ -168,7 +177,7 @@
"kind": 6,
"importPath": "cogs.sysinfo",
"description": "cogs.sysinfo",
"peekOfCode": "class SysInfo(commands.Cog):\n def __init__(self, bot):\n self.bot = bot\n def strip_ansi(self, text):\n return re.sub(r'\\x1b\\[[0-9;]*[a-zA-Z]|\\[[0-9]+[A-Z]', '', text)\n @commands.command()\n async def fetch(self, ctx):\n result = subprocess.run(['fastfetch', '--pipe', '--logo', 'none'], capture_output=True, text=True)\n clean = self.strip_ansi(result.stdout)\n await ctx.reply(f'```\\n{clean}\\n```')",
"peekOfCode": "class SysInfo(commands.Cog):\n def __init__(self, bot):\n self.bot = bot\n def strip_ansi(self, text):\n return re.sub(r'\\x1b\\[[0-9;]*[a-zA-Z]|\\[[0-9]+[A-Z]', '', text)\n #this command lists all the sysinfo commands, not an actualy sysinfo command##\n @commands.command()\n async def sysinfo(self, ctx):\n sys_commands = [f'!{cmd.name}' for cmd in self.get_commands()]\n await ctx.reply('\\n'.join(sys_commands))",
"detail": "cogs.sysinfo",
"documentation": {}
},