aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--discord/ext/commands/errors.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/discord/ext/commands/errors.py b/discord/ext/commands/errors.py
index c53da8b5..a2fef1fe 100644
--- a/discord/ext/commands/errors.py
+++ b/discord/ext/commands/errors.py
@@ -39,10 +39,13 @@ class CommandError(DiscordException):
in a special way as they are caught and passed into a special event
from :class:`Bot`\, :func:`on_command_error`.
"""
- def __init__(self, message):
- # clean-up @everyone and @here mentions
- m = message.replace('@everyone', '@\u200beveryone').replace('@here', '@\u200bhere')
- super().__init__(m)
+ def __init__(self, message=None, *args):
+ if message is not None:
+ # clean-up @everyone and @here mentions
+ m = message.replace('@everyone', '@\u200beveryone').replace('@here', '@\u200bhere')
+ super().__init__(m, *args)
+ else:
+ super().__init__(*args)
class CommandNotFound(CommandError):
"""Exception raised when a command is attempted to be invoked