diff --git a/discord/app_commands/tree.py b/discord/app_commands/tree.py index 86b6591f4..3d88f7fce 100644 --- a/discord/app_commands/tree.py +++ b/discord/app_commands/tree.py @@ -773,8 +773,8 @@ class CommandTree(Generic[ClientT]): raise TypeError('The error handler must be a coroutine.') params = inspect.signature(coro).parameters - if len(params) != 3: - raise TypeError('error handler must have 3 parameters') + if len(params) != 2: + raise TypeError('error handler must have 2 parameters') # Type checker doesn't like overriding methods like this self.on_error = coro # type: ignore