aboutsummaryrefslogtreecommitdiffstats
path: root/bot/exts/evergreen/error_handler.py
diff options
context:
space:
mode:
authorGravatar Shivansh <[email protected]>2021-05-20 18:47:27 +0530
committerGravatar Shivansh <[email protected]>2021-05-20 18:47:27 +0530
commit03a2c3c737795863f70572d080ff5eed15137cce (patch)
tree66863cdc9383ec6fcbc4c4ff0d3ccff3e8902ce4 /bot/exts/evergreen/error_handler.py
parentMerge pull request #649 from Shivansh-007/feature/command-suggestions (diff)
(hotfix): Add __init__ to error handler cog
Diffstat (limited to 'bot/exts/evergreen/error_handler.py')
-rw-r--r--bot/exts/evergreen/error_handler.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/bot/exts/evergreen/error_handler.py b/bot/exts/evergreen/error_handler.py
index cd53f932..5873fb83 100644
--- a/bot/exts/evergreen/error_handler.py
+++ b/bot/exts/evergreen/error_handler.py
@@ -22,6 +22,9 @@ QUESTION_MARK_ICON = "https://cdn.discordapp.com/emojis/512367613339369475.png"
class CommandErrorHandler(commands.Cog):
"""A error handler for the PythonDiscord server."""
+ def __init__(self, bot: Bot) -> None:
+ self.bot = bot
+
@staticmethod
def revert_cooldown_counter(command: commands.Command, message: Message) -> None:
"""Undoes the last cooldown counter for user-error cases."""
@@ -166,4 +169,4 @@ class CommandErrorHandler(commands.Cog):
def setup(bot: Bot) -> None:
"""Load the ErrorHandler cog."""
- bot.add_cog(CommandErrorHandler())
+ bot.add_cog(CommandErrorHandler(bot))