diff options
author | 2021-04-20 15:46:30 -0400 | |
---|---|---|
committer | 2021-04-20 15:46:30 -0400 | |
commit | cda51f67c08df73951faa960858d72da281cfb74 (patch) | |
tree | c60925226262cbca2ccf6a3db139dff669aa2831 /bot/exts/evergreen/error_handler.py | |
parent | Clean Up Christmas Season (diff) | |
parent | chore: ctx.channel.send -> ctx.send (diff) |
Merge branch 'spring-cleanup' of https://github.com/ToxicKidz/sir-lancebot into spring-cleanup
Diffstat (limited to 'bot/exts/evergreen/error_handler.py')
-rw-r--r-- | bot/exts/evergreen/error_handler.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/bot/exts/evergreen/error_handler.py b/bot/exts/evergreen/error_handler.py index 8db49748..dabd0ab5 100644 --- a/bot/exts/evergreen/error_handler.py +++ b/bot/exts/evergreen/error_handler.py @@ -7,6 +7,7 @@ from discord import Embed, Message from discord.ext import commands from sentry_sdk import push_scope +from bot.bot import Bot from bot.constants import Channels, Colours, ERROR_REPLIES, NEGATIVE_REPLIES from bot.utils.decorators import InChannelCheckFailure, InMonthCheckFailure from bot.utils.exceptions import UserNotPlayingError @@ -17,9 +18,6 @@ log = logging.getLogger(__name__) class CommandErrorHandler(commands.Cog): """A error handler for the PythonDiscord server.""" - def __init__(self, bot: commands.Bot): - self.bot = bot - @staticmethod def revert_cooldown_counter(command: commands.Command, message: Message) -> None: """Undoes the last cooldown counter for user-error cases.""" @@ -135,6 +133,6 @@ class CommandErrorHandler(commands.Cog): log.exception(f"Unhandled command error: {str(error)}", exc_info=error) -def setup(bot: commands.Bot) -> None: - """Error handler Cog load.""" +def setup(bot: Bot) -> None: + """Load the ErrorHandler cog.""" bot.add_cog(CommandErrorHandler(bot)) |