From c97ab24e8bd8f33bb6b8366ed3ca70ca04aeae0b Mon Sep 17 00:00:00 2001 From: Zevaryx Date: Sun, 27 Jun 2021 01:11:53 -0600 Subject: [PATCH] Update dbrand commands --- jarvis/cogs/dbrand.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/jarvis/cogs/dbrand.py b/jarvis/cogs/dbrand.py index 8e19f31..687206f 100644 --- a/jarvis/cogs/dbrand.py +++ b/jarvis/cogs/dbrand.py @@ -516,7 +516,7 @@ class DbrandCog(commands.Cog): self.bot = bot self.base_url = "https://dbrand.com/" - @commands.group(name="db", pass_context=True) + @commands.group(name="db", aliases=["dbrand"], pass_context=True) async def _db(self, ctx): if ctx.invoked_subcommand is None: await ctx.send( @@ -538,13 +538,11 @@ class DbrandCog(commands.Cog): @_db.command(name="shipping") async def _shipping(self, ctx, *, search: str): - if not re.match(search, r"^[A-Z-]+$", re.IGNORECASE): + if not re.match(r"^[A-Z- ]+$", search, re.IGNORECASE): await ctx.send("Please use text to search for shipping.") search = "-".join(search.split(" ")) matches = [ - x - for x in DBRAND_DATA["shippingArray"] - if x.contains(search.lower()) + x for x in DBRAND_DATA["shippingArray"] if search.lower() in x ] if len(matches) > 0: link = self.base_url + "/shipping/" + matches[0] @@ -555,10 +553,12 @@ class DbrandCog(commands.Cog): + "(https://dbrand.com/shipping)", color="#FFBB00", url=link, - image="https://upload.wikimedia.org/wikipedia/commons/thumb" - + "/b/b4/Dbrand_logo.svg/2560px-Dbrand_logo.svg.png", - thumbnail="https://dev.zevaryx.com/db_logo.png", ) + embed.set_image( + "https://upload.wikimedia.org/wikipedia/commons/thumb" + + "/b/b4/Dbrand_logo.svg/2560px-Dbrand_logo.svg.png" + ) + embed.set_thumbnail("https://dev.zevaryx.com/db_logo.png") await ctx.send(embed=embed)