aboutsummaryrefslogtreecommitdiffstats
path: root/bot/seasons/evergreen
diff options
context:
space:
mode:
authorGravatar sco1 <[email protected]>2019-03-03 21:50:01 -0500
committerGravatar sco1 <[email protected]>2019-03-03 21:50:01 -0500
commitb53d8d8b7fe7c33c6931fa9075c30c27ea9c02da (patch)
tree92ab3e99bebbc0b0dac06571d1e2e6d30f2622cf /bot/seasons/evergreen
parentMerge pull request #112 from RohanJnr/be-my-valentine-iceman (diff)
Add new Cog class inheritance & event listener decoration
Mitigates recent breaking d.py changes
Diffstat (limited to 'bot/seasons/evergreen')
-rw-r--r--bot/seasons/evergreen/error_handler.py3
-rw-r--r--bot/seasons/evergreen/fun.py2
-rw-r--r--bot/seasons/evergreen/uptime.py2
3 files changed, 4 insertions, 3 deletions
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"""
diff --git a/bot/seasons/evergreen/fun.py b/bot/seasons/evergreen/fun.py
index 4da01dd1..0003714d 100644
--- a/bot/seasons/evergreen/fun.py
+++ b/bot/seasons/evergreen/fun.py
@@ -8,7 +8,7 @@ from bot.constants import Emojis
log = logging.getLogger(__name__)
-class Fun:
+class Fun(commands.Cog):
"""
A collection of general commands for fun.
"""
diff --git a/bot/seasons/evergreen/uptime.py b/bot/seasons/evergreen/uptime.py
index 1321da19..cce5ae76 100644
--- a/bot/seasons/evergreen/uptime.py
+++ b/bot/seasons/evergreen/uptime.py
@@ -9,7 +9,7 @@ from bot import start_time
log = logging.getLogger(__name__)
-class Uptime:
+class Uptime(commands.Cog):
"""
A cog for posting the bots uptime.
"""