aboutsummaryrefslogtreecommitdiffstats
path: root/bot/bot.py
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/bot.py
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/bot.py')
-rw-r--r--bot/bot.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/bot/bot.py b/bot/bot.py
index 12291a5f..84bac598 100644
--- a/bot/bot.py
+++ b/bot/bot.py
@@ -6,7 +6,7 @@ from typing import List
from aiohttp import AsyncResolver, ClientSession, TCPConnector
from discord import Embed
from discord.ext import commands
-from discord.ext.commands import Bot
+from discord.ext.commands import Bot, Cog
from bot import constants
@@ -63,6 +63,7 @@ class SeasonalBot(Bot):
await devlog.send(embed=embed)
+ @Cog.listener()
async def on_command_error(self, context, exception):
# Don't punish the user for getting the arguments wrong
if isinstance(exception, commands.UserInputError):