diff options
author | 2019-03-03 21:50:01 -0500 | |
---|---|---|
committer | 2019-03-03 21:50:01 -0500 | |
commit | b53d8d8b7fe7c33c6931fa9075c30c27ea9c02da (patch) | |
tree | 92ab3e99bebbc0b0dac06571d1e2e6d30f2622cf /bot/bot.py | |
parent | Merge 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.py | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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): |