From b53d8d8b7fe7c33c6931fa9075c30c27ea9c02da Mon Sep 17 00:00:00 2001 From: sco1 Date: Sun, 3 Mar 2019 21:50:01 -0500 Subject: Add new Cog class inheritance & event listener decoration Mitigates recent breaking d.py changes --- bot/seasons/evergreen/error_handler.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'bot/seasons/evergreen/error_handler.py') diff --git a/bot/seasons/evergreen/error_handler.py b/bot/seasons/evergreen/error_handler.py index 47e18a31..d764fe86 100644 --- a/bot/seasons/evergreen/error_handler.py +++ b/bot/seasons/evergreen/error_handler.py @@ -8,12 +8,13 @@ from discord.ext import commands log = logging.getLogger(__name__) -class CommandErrorHandler: +class CommandErrorHandler(commands.Cog): """A error handler for the PythonDiscord server!""" def __init__(self, bot): self.bot = bot + @commands.Cog.listener() async def on_command_error(self, ctx, error): """Activates when a command opens an error""" -- cgit v1.2.3