fix: improved formatting on nslookup command

This commit is contained in:
Seaswimmer 2023-08-07 09:43:44 -04:00
parent 0c3c975dd6
commit 6319595c8b
No known key found for this signature in database
GPG key ID: 5019678FD9CF50D8

View file

@ -38,7 +38,7 @@ class Galaxy(commands.Cog):
async def nslookup(self, ctx: commands.Context, *, website: str): async def nslookup(self, ctx: commands.Context, *, website: str):
try: try:
result = subprocess.run(['nslookup', website], capture_output=True, text=True, check=True) result = subprocess.run(['nslookup', website], capture_output=True, text=True, check=True)
await ctx.send(result.stdout) await ctx.send(f"```\n{result.stdout}\n```")
except subprocess.CalledProcessError as e: except subprocess.CalledProcessError as e:
await ctx.send(f"Error executing nslookup: {e}") await ctx.send(f"Error executing nslookup: {e}")
except FileNotFoundError: except FileNotFoundError: