From 7654c8477bcfad686f907dcf3c9cecdcf042f8ac Mon Sep 17 00:00:00 2001 From: Slushie Date: Mon, 26 Jul 2021 13:40:11 +0100 Subject: [PATCH 1/2] [ColourRole] fix unexpected error due to cooldown --- cogs/ColourRole.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cogs/ColourRole.py b/cogs/ColourRole.py index 8e5851d4..ffca6f11 100644 --- a/cogs/ColourRole.py +++ b/cogs/ColourRole.py @@ -164,7 +164,7 @@ async def custom_colour_error(self, ctx: commands.Context, error): """ if isinstance(error, commands.CheckFailure): await ctx.send("You don't have the required role to use this command.") - else: + elif not isinstance(error, commands.CommandOnCooldown): import time KoalaBot.logger.error(f"Unexpected error occurred in Guild {ctx.guild.id}, channel {ctx.channel.id}. " f"Error was of type {str(type(error))}. Cause was {error.__cause__}.") From d126433ce7f7554a0efe6a09669a74cdc1a4a5de Mon Sep 17 00:00:00 2001 From: Slushie Date: Sun, 8 Aug 2021 06:12:16 +0100 Subject: [PATCH 2/2] [ColourRole] add cooldown fix to changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 72e2a29d..8c462bd9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ All notable changes to KoalaBot will be documented in this file. A lot of these commands will only be available to administrators ## [Unreleased] +### ColourRole +- Fix unexpected error due to cooldown ### Other - Testing updated to use builders in dpytest 0.5.0