Skip to content

Commit

Permalink
Merge pull request #301 from Makiyu-py/rename-err-update
Browse files Browse the repository at this point in the history
rename cog.py InteractionContext occurrences to the new name
  • Loading branch information
Middledot authored Oct 22, 2021
2 parents b014cc0 + 8194d64 commit 88a688b
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions discord/cog.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
from .commands.commands import _BaseCommand

if TYPE_CHECKING:
from .commands import InteractionContext, ApplicationCommand
from .commands import ApplicationContext, ApplicationCommand

__all__ = (
'CogMeta',
Expand Down Expand Up @@ -358,7 +358,7 @@ def cog_unload(self) -> None:
pass

@_cog_special_method
def bot_check_once(self, ctx: InteractionContext) -> bool:
def bot_check_once(self, ctx: ApplicationContext) -> bool:
"""A special method that registers as a :meth:`.Bot.check_once`
check.
Expand All @@ -368,7 +368,7 @@ def bot_check_once(self, ctx: InteractionContext) -> bool:
return True

@_cog_special_method
def bot_check(self, ctx: InteractionContext) -> bool:
def bot_check(self, ctx: ApplicationContext) -> bool:
"""A special method that registers as a :meth:`.Bot.check`
check.
Expand All @@ -378,7 +378,7 @@ def bot_check(self, ctx: InteractionContext) -> bool:
return True

@_cog_special_method
def cog_check(self, ctx: InteractionContext) -> bool:
def cog_check(self, ctx: ApplicationContext) -> bool:
"""A special method that registers as a :func:`~discord.ext.commands.check`
for every command and subcommand in this cog.
Expand All @@ -388,7 +388,7 @@ def cog_check(self, ctx: InteractionContext) -> bool:
return True

@_cog_special_method
async def cog_command_error(self, ctx: InteractionContext, error: Exception) -> None:
async def cog_command_error(self, ctx: ApplicationContext, error: Exception) -> None:
"""A special method that is called whenever an error
is dispatched inside this cog.
Expand All @@ -407,7 +407,7 @@ async def cog_command_error(self, ctx: InteractionContext, error: Exception) ->
pass

@_cog_special_method
async def cog_before_invoke(self, ctx: InteractionContext) -> None:
async def cog_before_invoke(self, ctx: ApplicationContext) -> None:
"""A special method that acts as a cog local pre-invoke hook.
This is similar to :meth:`.Command.before_invoke`.
Expand All @@ -422,7 +422,7 @@ async def cog_before_invoke(self, ctx: InteractionContext) -> None:
pass

@_cog_special_method
async def cog_after_invoke(self, ctx: InteractionContext) -> None:
async def cog_after_invoke(self, ctx: ApplicationContext) -> None:
"""A special method that acts as a cog local post-invoke hook.
This is similar to :meth:`.Command.after_invoke`.
Expand Down

0 comments on commit 88a688b

Please sign in to comment.