36
36
from .commands .commands import _BaseCommand
37
37
38
38
if TYPE_CHECKING :
39
- from .commands import InteractionContext , ApplicationCommand
39
+ from .commands import ApplicationContext , ApplicationCommand
40
40
41
41
__all__ = (
42
42
'CogMeta' ,
@@ -358,7 +358,7 @@ def cog_unload(self) -> None:
358
358
pass
359
359
360
360
@_cog_special_method
361
- def bot_check_once (self , ctx : InteractionContext ) -> bool :
361
+ def bot_check_once (self , ctx : ApplicationContext ) -> bool :
362
362
"""A special method that registers as a :meth:`.Bot.check_once`
363
363
check.
364
364
@@ -368,7 +368,7 @@ def bot_check_once(self, ctx: InteractionContext) -> bool:
368
368
return True
369
369
370
370
@_cog_special_method
371
- def bot_check (self , ctx : InteractionContext ) -> bool :
371
+ def bot_check (self , ctx : ApplicationContext ) -> bool :
372
372
"""A special method that registers as a :meth:`.Bot.check`
373
373
check.
374
374
@@ -378,7 +378,7 @@ def bot_check(self, ctx: InteractionContext) -> bool:
378
378
return True
379
379
380
380
@_cog_special_method
381
- def cog_check (self , ctx : InteractionContext ) -> bool :
381
+ def cog_check (self , ctx : ApplicationContext ) -> bool :
382
382
"""A special method that registers as a :func:`~discord.ext.commands.check`
383
383
for every command and subcommand in this cog.
384
384
@@ -388,7 +388,7 @@ def cog_check(self, ctx: InteractionContext) -> bool:
388
388
return True
389
389
390
390
@_cog_special_method
391
- async def cog_command_error (self , ctx : InteractionContext , error : Exception ) -> None :
391
+ async def cog_command_error (self , ctx : ApplicationContext , error : Exception ) -> None :
392
392
"""A special method that is called whenever an error
393
393
is dispatched inside this cog.
394
394
@@ -407,7 +407,7 @@ async def cog_command_error(self, ctx: InteractionContext, error: Exception) ->
407
407
pass
408
408
409
409
@_cog_special_method
410
- async def cog_before_invoke (self , ctx : InteractionContext ) -> None :
410
+ async def cog_before_invoke (self , ctx : ApplicationContext ) -> None :
411
411
"""A special method that acts as a cog local pre-invoke hook.
412
412
413
413
This is similar to :meth:`.Command.before_invoke`.
@@ -422,7 +422,7 @@ async def cog_before_invoke(self, ctx: InteractionContext) -> None:
422
422
pass
423
423
424
424
@_cog_special_method
425
- async def cog_after_invoke (self , ctx : InteractionContext ) -> None :
425
+ async def cog_after_invoke (self , ctx : ApplicationContext ) -> None :
426
426
"""A special method that acts as a cog local post-invoke hook.
427
427
428
428
This is similar to :meth:`.Command.after_invoke`.
0 commit comments