diff options
author | 2020-03-22 23:58:46 +0100 | |
---|---|---|
committer | 2020-03-22 23:58:46 +0100 | |
commit | fcdd9ffe43c3de65089710e03609f9a7e370b196 (patch) | |
tree | b715c305ffb8c3815140217dedcbbd355cc85cb3 | |
parent | Deseasonify: add exceptions module (diff) |
Deseasonify: handle BrandingError
-rw-r--r-- | bot/seasons/evergreen/error_handler.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/bot/seasons/evergreen/error_handler.py b/bot/seasons/evergreen/error_handler.py index ba6ca5ec..8b53b286 100644 --- a/bot/seasons/evergreen/error_handler.py +++ b/bot/seasons/evergreen/error_handler.py @@ -8,6 +8,7 @@ from discord.ext import commands from bot.constants import Colours, ERROR_REPLIES, NEGATIVE_REPLIES from bot.decorators import InChannelCheckFailure, InMonthCheckFailure +from bot.exceptions import BrandingError log = logging.getLogger(__name__) @@ -55,6 +56,10 @@ class CommandErrorHandler(commands.Cog): if isinstance(error, commands.CommandNotFound): return + if isinstance(error, BrandingError): + await ctx.send(embed=self.error_embed(str(error))) + return + if isinstance(error, (InChannelCheckFailure, InMonthCheckFailure)): await ctx.send(embed=self.error_embed(str(error), NEGATIVE_REPLIES), delete_after=7.5) return |