From 8b68cb7530ab59d494f62952efb38589b762dca7 Mon Sep 17 00:00:00 2001 From: Seaswimmer Date: Tue, 28 May 2024 17:54:46 -0400 Subject: [PATCH] fix(seautils): don't use match and case --- seautils/seautils.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/seautils/seautils.py b/seautils/seautils.py index c884d08..cf29811 100644 --- a/seautils/seautils.py +++ b/seautils/seautils.py @@ -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)