aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar ChrisJL <[email protected]>2021-05-20 14:29:09 +0100
committerGravatar GitHub <[email protected]>2021-05-20 14:29:09 +0100
commitc3c5039b71de79dd52f1e617881c9781bc809eef (patch)
tree66863cdc9383ec6fcbc4c4ff0d3ccff3e8902ce4
parentMerge pull request #649 from Shivansh-007/feature/command-suggestions (diff)
parent(hotfix): Add __init__ to error handler cog (diff)
Merge pull request #748 from Shivansh-007/main
(hotfix): Add __init__ to error handler cog
-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))