mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-04-21 00:07:51 +00:00
Fix remaining --verifytypes related errors
This commit is contained in:
parent
5536ef1eea
commit
6ee56fe964
@ -989,7 +989,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:
|
||||
|
@ -233,7 +233,7 @@ class HybridAppCommand(discord.app_commands.Command[CogT, P, T]):
|
||||
del wrapped.callback.__signature__
|
||||
|
||||
self.wrapped: Command[CogT, Any, T] = wrapped
|
||||
self.binding = wrapped.cog
|
||||
self.binding: Optional[CogT] = wrapped.cog
|
||||
|
||||
def _copy_with(self, **kwargs) -> Self:
|
||||
copy: Self = super()._copy_with(**kwargs) # type: ignore
|
||||
@ -383,7 +383,7 @@ class HybridCommand(Command[CogT, P, T]):
|
||||
self,
|
||||
func: CommandCallback[CogT, ContextT, P, T],
|
||||
/,
|
||||
**kwargs,
|
||||
**kwargs: Any,
|
||||
) -> None:
|
||||
super().__init__(func, **kwargs)
|
||||
self.app_command: HybridAppCommand[CogT, Any, T] = HybridAppCommand(self)
|
||||
|
Loading…
x
Reference in New Issue
Block a user