From 48237b74d774b8e9e19e52f42943d687fe8f4208 Mon Sep 17 00:00:00 2001 From: Zevaryx Date: Thu, 22 Jul 2021 09:11:35 -0600 Subject: [PATCH] Fix ctc2 error with typo, add error message for message on cooldown --- jarvis/cogs/ctc2.py | 2 +- jarvis/cogs/error.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/jarvis/cogs/ctc2.py b/jarvis/cogs/ctc2.py index a3c195a..fd8f3d5 100644 --- a/jarvis/cogs/ctc2.py +++ b/jarvis/cogs/ctc2.py @@ -32,7 +32,7 @@ class CTCCog(commands.Cog): description="Guess a password for https://completethecodetwo.cards", guild_ids=guild_ids, ) - @commands.cooldown(1, 2, commands.BucketType.uer) + @commands.cooldown(1, 2, commands.BucketType.user) async def _pw(self, ctx, guess: str): guessed = self.db.ctc2.guesses.find_one({"guess": guess}) if guessed: diff --git a/jarvis/cogs/error.py b/jarvis/cogs/error.py index dc80603..bb552fb 100644 --- a/jarvis/cogs/error.py +++ b/jarvis/cogs/error.py @@ -11,6 +11,8 @@ class ErrorHandlerCog(commands.Cog): await ctx.send("I'm afraid I can't let you do that.") elif isinstance(error, commands.errors.CommandNotFound): return + elif isinstance(error, commands.errors.CommandOnCooldown): + await ctx.send("Please wait before trying again") else: await ctx.send(f"Error processing command:\n```{error}```") @@ -22,6 +24,8 @@ class ErrorHandlerCog(commands.Cog): await ctx.send("I'm afraid I can't let you do that.", hidden=True) elif isinstance(error, commands.errors.CommandNotFound): return + elif isinstance(error, commands.errors.CommandOnCooldown): + await ctx.send("Please wait before trying again") else: await ctx.send( f"Error processing command:\n```{error}```", hidden=True