fix(seautils): don't use match and case

This commit is contained in:
Seaswimmer 2024-05-28 17:54:46 -04:00
parent 028cae9e99
commit 8b68cb7530
Signed by untrusted user: cswimr
GPG key ID: 5D671B5D03D65A7F

View file

@ -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)