aboutsummaryrefslogtreecommitdiffstats
path: root/bot/seasons/evergreen/error_handler.py
diff options
context:
space:
mode:
authorGravatar kwzrd <[email protected]>2020-03-22 23:58:46 +0100
committerGravatar kwzrd <[email protected]>2020-03-22 23:58:46 +0100
commitfcdd9ffe43c3de65089710e03609f9a7e370b196 (patch)
treeb715c305ffb8c3815140217dedcbbd355cc85cb3 /bot/seasons/evergreen/error_handler.py
parentDeseasonify: add exceptions module (diff)
Deseasonify: handle BrandingError
Diffstat (limited to 'bot/seasons/evergreen/error_handler.py')
-rw-r--r--bot/seasons/evergreen/error_handler.py5
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