fix(seautils): don't use match and case
Some checks failed
Actions / Build Documentation (MkDocs) (push) Successful in 25s
Actions / Lint Code (Ruff & Pylint) (push) Failing after 38s

This commit is contained in:
Seaswimmer 2024-05-28 17:54:46 -04:00
parent 028cae9e99
commit 8b68cb7530
Signed by: 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':
if response_data.get('status') != 'NOERROR':
embed.colour = Color.red()
embed.description = "Dig query did not return `NOERROR` status."
case _:
embed.colour = await ctx.embed_color()
question_section = "\n".join(response_data['QUESTION_SECTION'])
embed.add_field(name="Question Section", value=f"```{question_section}```", inline=False)