fix #4
This commit is contained in:
1 parent
3679ba44af
commit
aa7a2eb855
2 files changed
+2
-2
No files matched your search
+1
-1
@@ -168,7 +168,7 @@
|
|||||||
"kind": 6,
|
"kind": 6,
|
||||||
"importPath": "cogs.sysinfo",
|
"importPath": "cogs.sysinfo",
|
||||||
"description": "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'], 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 @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```')",
|
||||||
"detail": "cogs.sysinfo",
|
"detail": "cogs.sysinfo",
|
||||||
"documentation": {}
|
"documentation": {}
|
||||||
},
|
},
|
||||||
|
|||||||
+1
-1
@@ -12,7 +12,7 @@ class SysInfo(commands.Cog):
|
|||||||
|
|
||||||
@commands.command()
|
@commands.command()
|
||||||
async def fetch(self, ctx):
|
async def fetch(self, ctx):
|
||||||
result = subprocess.run(['fastfetch', '--pipe'], capture_output=True, text=True)
|
result = subprocess.run(['fastfetch', '--pipe', '--logo', 'none'], capture_output=True, text=True)
|
||||||
clean = self.strip_ansi(result.stdout)
|
clean = self.strip_ansi(result.stdout)
|
||||||
await ctx.reply(f'```\n{clean}\n```')
|
await ctx.reply(f'```\n{clean}\n```')
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user