added sysinfo.py
This commit is contained in:
1 parent
d1327c95b0
commit
e02020cd25
2 files changed
+38
No files matched your search
+26
@@ -39,6 +39,14 @@
|
|||||||
"detail": "discord.ext",
|
"detail": "discord.ext",
|
||||||
"documentation": {}
|
"documentation": {}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"label": "commands",
|
||||||
|
"importPath": "discord.ext",
|
||||||
|
"description": "discord.ext",
|
||||||
|
"isExtraImport": true,
|
||||||
|
"detail": "discord.ext",
|
||||||
|
"documentation": {}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"label": "random",
|
"label": "random",
|
||||||
"kind": 6,
|
"kind": 6,
|
||||||
@@ -66,6 +74,15 @@
|
|||||||
"detail": "io",
|
"detail": "io",
|
||||||
"documentation": {}
|
"documentation": {}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"label": "subprocess",
|
||||||
|
"kind": 6,
|
||||||
|
"isExtraImport": true,
|
||||||
|
"importPath": "subprocess",
|
||||||
|
"description": "subprocess",
|
||||||
|
"detail": "subprocess",
|
||||||
|
"documentation": {}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"label": "load_dotenv",
|
"label": "load_dotenv",
|
||||||
"importPath": "dotenv",
|
"importPath": "dotenv",
|
||||||
@@ -137,6 +154,15 @@
|
|||||||
"detail": "cogs.gifs",
|
"detail": "cogs.gifs",
|
||||||
"documentation": {}
|
"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",
|
"label": "intents",
|
||||||
"kind": 5,
|
"kind": 5,
|
||||||
|
|||||||
@@ -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```')
|
||||||
Reference in new issue
Block a user