diff --git a/.vscode/PythonImportHelper-v2-Completion.json b/.vscode/PythonImportHelper-v2-Completion.json index d156201..82a8d03 100644 --- a/.vscode/PythonImportHelper-v2-Completion.json +++ b/.vscode/PythonImportHelper-v2-Completion.json @@ -39,6 +39,14 @@ "detail": "discord.ext", "documentation": {} }, + { + "label": "commands", + "importPath": "discord.ext", + "description": "discord.ext", + "isExtraImport": true, + "detail": "discord.ext", + "documentation": {} + }, { "label": "random", "kind": 6, @@ -66,6 +74,15 @@ "detail": "io", "documentation": {} }, + { + "label": "subprocess", + "kind": 6, + "isExtraImport": true, + "importPath": "subprocess", + "description": "subprocess", + "detail": "subprocess", + "documentation": {} + }, { "label": "load_dotenv", "importPath": "dotenv", @@ -137,6 +154,15 @@ "detail": "cogs.gifs", "documentation": {} }, + { + "label": "SysInfo", + "kind": 6, + "importPath": "cogs.sysinfo", + "description": "cogs.sysinfo", + "peekOfCode": "class SysInfo(commands.Cog):\n def __init__(self,bot):\n self.bot = bot\n @commands.command()\n async def fetch(self, ctx):\n result = subprocess.run(['fastfetch'], capture_output=True, text=True)\n await ctx.reply(f'```\\n{result.stdout}\\n```')", + "detail": "cogs.sysinfo", + "documentation": {} + }, { "label": "intents", "kind": 5, diff --git a/cogs/sysinfo.py b/cogs/sysinfo.py new file mode 100644 index 0000000..a5e5364 --- /dev/null +++ b/cogs/sysinfo.py @@ -0,0 +1,12 @@ +import subprocess +import discord +from discord.ext import commands + +class SysInfo(commands.Cog): + def __init__(self,bot): + self.bot = bot + + @commands.command() + async def fetch(self, ctx): + result = subprocess.run(['fastfetch'], capture_output=True, text=True) + await ctx.reply(f'```\n{result.stdout}\n```') \ No newline at end of file