fix(seautils): don't use match and case
This commit is contained in:
parent
028cae9e99
commit
8b68cb7530
1 changed files with 3 additions and 6 deletions
|
@ -118,12 +118,9 @@ class SeaUtils(commands.Cog):
|
|||
embed.add_field(name="Status", value=response_data['status'], inline=True)
|
||||
embed.add_field(name="Flags", value=response_data['flags'], inline=True)
|
||||
|
||||
match response_data.get('status'):
|
||||
case 'FORMERR', 'SERVFAIL', 'NXDOMAIN', 'NOTIMP', 'REFUSED':
|
||||
embed.colour = Color.red()
|
||||
embed.description = "Dig query did not return `NOERROR` status."
|
||||
case _:
|
||||
embed.colour = await ctx.embed_color()
|
||||
if response_data.get('status') != 'NOERROR':
|
||||
embed.colour = Color.red()
|
||||
embed.description = "Dig query did not return `NOERROR` status."
|
||||
|
||||
question_section = "\n".join(response_data['QUESTION_SECTION'])
|
||||
embed.add_field(name="Question Section", value=f"```{question_section}```", inline=False)
|
||||
|
|
Loading…
Reference in a new issue