diff options
Diffstat (limited to 'bot/command_error_handlers')
| -rw-r--r-- | bot/command_error_handlers/__init__.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/bot/command_error_handlers/__init__.py b/bot/command_error_handlers/__init__.py index e69de29b..a5181636 100644 --- a/bot/command_error_handlers/__init__.py +++ b/bot/command_error_handlers/__init__.py @@ -0,0 +1,14 @@ +from pydis_core.utils.error_handling.commands import CommandErrorManager + +from bot.bot import Bot + +from .command_not_found import CommandNotFoundErrorHandler +from .default import DefaultCommandErrorHandler + + +def bootstrap_command_error_manager(bot: Bot) -> CommandErrorManager: + """Bootstraps the command error manager with all the needed error handlers.""" + default_handler = DefaultCommandErrorHandler() + manager = CommandErrorManager(default=default_handler) + manager.register_handler(CommandNotFoundErrorHandler(bot)) + return manager |