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():
|
if ctx.embed_requested():
|
||||||
embed = Embed(
|
embed = Embed(
|
||||||
title="DNS Query Result",
|
title="DNS Query Result",
|
||||||
description=f"Query for {response_data['QUESTION_SECTION'][0]}",
|
|
||||||
color=await ctx.embed_color(),
|
color=await ctx.embed_color(),
|
||||||
timestamp=message_data['response_time']
|
timestamp=message_data['response_time']
|
||||||
)
|
)
|
||||||
|
@ -122,6 +121,7 @@ class SeaUtils(commands.Cog):
|
||||||
question_section = "\n".join(response_data['QUESTION_SECTION'])
|
question_section = "\n".join(response_data['QUESTION_SECTION'])
|
||||||
embed.add_field(name="Question Section", value=f"```{question_section}```", inline=False)
|
embed.add_field(name="Question Section", value=f"```{question_section}```", inline=False)
|
||||||
|
|
||||||
|
if 'ANSWER_SECTION' in response_data:
|
||||||
answer_section = "\n".join(response_data['ANSWER_SECTION'])
|
answer_section = "\n".join(response_data['ANSWER_SECTION'])
|
||||||
embed.add_field(name="Answer Section", value=f"```{answer_section}```", inline=False)
|
embed.add_field(name="Answer Section", value=f"```{answer_section}```", inline=False)
|
||||||
await ctx.send(embed=embed)
|
await ctx.send(embed=embed)
|
||||||
|
|
Loading…
Reference in a new issue