From 0c325d07f00bf38bc710d88922b46ff14f46114a Mon Sep 17 00:00:00 2001 From: Zevaryx Date: Sun, 27 Jun 2021 17:19:30 -0600 Subject: [PATCH] Add emoji support in shipping search --- jarvis/cogs/dbrand.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/jarvis/cogs/dbrand.py b/jarvis/cogs/dbrand.py index 0162ebf..40c07cc 100644 --- a/jarvis/cogs/dbrand.py +++ b/jarvis/cogs/dbrand.py @@ -46,7 +46,11 @@ class DbrandCog(commands.Cog): @_db.command(name="shipping", aliases=["ship", "s"]) async def _shipping(self, ctx, *, search: str): if not re.match(r"^[A-Z- ]+$", search, re.IGNORECASE): - if re.match(f"^:flag_[a-z]{2}:$", search, re.IGNORECASE): + if re.match( + f"^[\uD83C][\uDDE6-\uDDFF][\uD83C][\uDDE6-\uDDFF]$", + search, + re.IGNORECASE, + ): search = search.split("_")[1][:-1] else: await ctx.send("Please use text to search for shipping.")