diff --git a/seautils/seautils.py b/seautils/seautils.py index 6eaafa7..198a748 100644 --- a/seautils/seautils.py +++ b/seautils/seautils.py @@ -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'))