Browse Source

[commands] Fix generic arg on Context.interaction

pull/9218/head
Rapptz 2 years ago
parent
commit
23bcb07d2b
  1. 6
      discord/ext/commands/context.py

6
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

Loading…
Cancel
Save