diff --git a/discord/ext/commands/core.py b/discord/ext/commands/core.py index 81e106f61..55f63fd1d 100644 --- a/discord/ext/commands/core.py +++ b/discord/ext/commands/core.py @@ -978,7 +978,7 @@ class Command(_BaseCommand, Generic[CogT, P, T]): if not asyncio.iscoroutinefunction(coro): raise TypeError('The error handler must be a coroutine.') - self.on_error: Error[Any] = coro + self.on_error: Error[CogT, Any] = coro return coro def has_error_handler(self) -> bool: