fix(seautils): fixed maybe_send_message
Some checks failed
Actions / Build Documentation (MkDocs) (push) Successful in 25s
Actions / Lint Code (Ruff & Pylint) (push) Failing after 38s

This commit is contained in:
Seaswimmer 2024-05-28 18:02:17 -04:00
parent d444242245
commit 091f4fe36d
Signed by: cswimr
GPG key ID: 5D671B5D03D65A7F

View file

@ -102,11 +102,11 @@ class SeaUtils(commands.Cog):
process: Process = await asyncio.create_subprocess_exec(*command_opts, stdout=asyncio.subprocess.PIPE, stderr=asyncio.subprocess.PIPE) process: Process = await asyncio.create_subprocess_exec(*command_opts, stdout=asyncio.subprocess.PIPE, stderr=asyncio.subprocess.PIPE)
stdout, stderr = await process.communicate() stdout, stderr = await process.communicate()
except (FileNotFoundError): except (FileNotFoundError):
await ctx.maybe_send_embed(content="The `dig` command is not installed on this system.") await ctx.maybe_send_embed(message="The `dig` command is not installed on this system.")
return return
if stderr: if stderr:
await ctx.maybe_send_embed(content= "An error was encountered!\n" + cf.box(text=stderr.decode())) await ctx.maybe_send_embed(message="An error was encountered!\n" + cf.box(text=stderr.decode()))
else: else:
data = yaml.safe_load(stdout.decode()) data = yaml.safe_load(stdout.decode())
message_data: dict = data[0]['message'] message_data: dict = data[0]['message']