From 23bcb07d2bba86d21fc48e13608dbe899568f9fa Mon Sep 17 00:00:00 2001 From: Rapptz Date: Wed, 1 Feb 2023 07:46:31 -0500 Subject: [PATCH] [commands] Fix generic arg on Context.interaction --- discord/ext/commands/context.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/discord/ext/commands/context.py b/discord/ext/commands/context.py index 3b20a50e4..2a9938d40 100644 --- a/discord/ext/commands/context.py +++ b/discord/ext/commands/context.py @@ -190,7 +190,7 @@ class Context(discord.abc.Messageable, Generic[BotT]): command_failed: bool = False, current_parameter: Optional[Parameter] = None, current_argument: Optional[str] = None, - interaction: Optional[Interaction] = None, + interaction: Optional[Interaction[BotT]] = None, ): self.message: Message = message self.bot: BotT = bot @@ -206,11 +206,11 @@ class Context(discord.abc.Messageable, Generic[BotT]): self.command_failed: bool = command_failed self.current_parameter: Optional[Parameter] = current_parameter self.current_argument: Optional[str] = current_argument - self.interaction: Optional[Interaction] = interaction + self.interaction: Optional[Interaction[BotT]] = interaction self._state: ConnectionState = self.message._state @classmethod - async def from_interaction(cls, interaction: Interaction, /) -> Self: + async def from_interaction(cls, interaction: Interaction[BotT], /) -> Self: """|coro| Creates a context from a :class:`discord.Interaction`. This only