mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-05-12 00:39:56 +00:00
[commands] Fix generic arg on Context.interaction
This commit is contained in:
parent
774219acae
commit
23bcb07d2b
@ -190,7 +190,7 @@ class Context(discord.abc.Messageable, Generic[BotT]):
|
|||||||
command_failed: bool = False,
|
command_failed: bool = False,
|
||||||
current_parameter: Optional[Parameter] = None,
|
current_parameter: Optional[Parameter] = None,
|
||||||
current_argument: Optional[str] = None,
|
current_argument: Optional[str] = None,
|
||||||
interaction: Optional[Interaction] = None,
|
interaction: Optional[Interaction[BotT]] = None,
|
||||||
):
|
):
|
||||||
self.message: Message = message
|
self.message: Message = message
|
||||||
self.bot: BotT = bot
|
self.bot: BotT = bot
|
||||||
@ -206,11 +206,11 @@ class Context(discord.abc.Messageable, Generic[BotT]):
|
|||||||
self.command_failed: bool = command_failed
|
self.command_failed: bool = command_failed
|
||||||
self.current_parameter: Optional[Parameter] = current_parameter
|
self.current_parameter: Optional[Parameter] = current_parameter
|
||||||
self.current_argument: Optional[str] = current_argument
|
self.current_argument: Optional[str] = current_argument
|
||||||
self.interaction: Optional[Interaction] = interaction
|
self.interaction: Optional[Interaction[BotT]] = interaction
|
||||||
self._state: ConnectionState = self.message._state
|
self._state: ConnectionState = self.message._state
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
async def from_interaction(cls, interaction: Interaction, /) -> Self:
|
async def from_interaction(cls, interaction: Interaction[BotT], /) -> Self:
|
||||||
"""|coro|
|
"""|coro|
|
||||||
|
|
||||||
Creates a context from a :class:`discord.Interaction`. This only
|
Creates a context from a :class:`discord.Interaction`. This only
|
||||||
|
Loading…
x
Reference in New Issue
Block a user