fix(seautils): fix a keyerror
This commit is contained in:
parent
93f358cfad
commit
aa7e347a95
1 changed files with 3 additions and 3 deletions
|
@ -108,7 +108,6 @@ class SeaUtils(commands.Cog):
|
|||
if ctx.embed_requested():
|
||||
embed = Embed(
|
||||
title="DNS Query Result",
|
||||
description=f"Query for {response_data['QUESTION_SECTION'][0]}",
|
||||
color=await ctx.embed_color(),
|
||||
timestamp=message_data['response_time']
|
||||
)
|
||||
|
@ -122,8 +121,9 @@ class SeaUtils(commands.Cog):
|
|||
question_section = "\n".join(response_data['QUESTION_SECTION'])
|
||||
embed.add_field(name="Question Section", value=f"```{question_section}```", inline=False)
|
||||
|
||||
answer_section = "\n".join(response_data['ANSWER_SECTION'])
|
||||
embed.add_field(name="Answer Section", value=f"```{answer_section}```", inline=False)
|
||||
if 'ANSWER_SECTION' in response_data:
|
||||
answer_section = "\n".join(response_data['ANSWER_SECTION'])
|
||||
embed.add_field(name="Answer Section", value=f"```{answer_section}```", inline=False)
|
||||
await ctx.send(embed=embed)
|
||||
else:
|
||||
await ctx.send(content=cf.box(text=stdout, lang='yaml'))
|
||||
|
|
Loading…
Reference in a new issue