fix(seautils): fixed maybe_send_message

This commit is contained in:
Seaswimmer 2024-05-28 18:02:17 -04:00
parent d444242245
commit 091f4fe36d
Signed by untrusted user: 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)
stdout, stderr = await process.communicate()
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
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:
data = yaml.safe_load(stdout.decode())
message_data: dict = data[0]['message']