diff --git a/CHANGELOG.md b/CHANGELOG.md index 36321822..20702c2c 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 administrators ## [Unreleased] +### ColourRole +- Fix unexpected error due to cooldown ### Other - Updated the credits and authors. diff --git a/cogs/ColourRole.py b/cogs/ColourRole.py index ddf0531f..29943107 100644 --- a/cogs/ColourRole.py +++ b/cogs/ColourRole.py @@ -168,7 +168,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__}.")