Skip to content

Commit

Permalink
fix(docs): add entitlements to interaction subclasses
Browse files Browse the repository at this point in the history
  • Loading branch information
shiftinv committed Mar 20, 2024
1 parent d92ba6a commit 581bf9f
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 11 deletions.
10 changes: 8 additions & 2 deletions disnake/interactions/application_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,16 @@ class ApplicationCommandInteraction(Interaction[ClientT]):
token: :class:`str`
The token to continue the interaction. These are valid for 15 minutes.
data: :class:`ApplicationCommandInteractionData`
The wrapped interaction data.
client: :class:`Client`
The interaction client.
entitlements: List[:class:`Entitlement`]
The entitlements for the invoking user and guild,
representing access to an application subscription.
.. versionadded:: 2.10
data: :class:`ApplicationCommandInteractionData`
The wrapped interaction data.
application_command: :class:`.InvokableApplicationCommand`
The command invoked by the interaction.
command_failed: :class:`bool`
Expand Down
14 changes: 10 additions & 4 deletions disnake/interactions/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,18 @@ class MessageInteraction(Interaction[ClientT]):
.. versionchanged:: 2.5
Changed to :class:`Locale` instead of :class:`str`.
message: Optional[:class:`Message`]
The message that sent this interaction.
data: :class:`MessageInteractionData`
The wrapped interaction data.
client: :class:`Client`
The interaction client.
entitlements: List[:class:`Entitlement`]
The entitlements for the invoking user and guild,
representing access to an application subscription.
.. versionadded:: 2.10
data: :class:`MessageInteractionData`
The wrapped interaction data.
message: Optional[:class:`Message`]
The message that this interaction's component is attached to.
"""

def __init__(self, *, data: MessageInteractionPayload, state: ConnectionState) -> None:
Expand Down
15 changes: 10 additions & 5 deletions disnake/interactions/modal.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,21 @@ class ModalInteraction(Interaction[ClientT]):
.. versionchanged:: 2.5
Changed to :class:`Locale` instead of :class:`str`.
client: :class:`Client`
The interaction client.
entitlements: List[:class:`Entitlement`]
The entitlements for the invoking user and guild,
representing access to an application subscription.
.. versionadded:: 2.10
data: :class:`ModalInteractionData`
The wrapped interaction data.
message: Optional[:class:`Message`]
The message that this interaction's modal originated from,
if the modal was sent in response to a component interaction.
.. versionadded:: 2.5
data: :class:`ModalInteractionData`
The wrapped interaction data.
client: :class:`Client`
The interaction client.
"""

__slots__ = ("message", "_cs_text_values")
Expand Down

0 comments on commit 581bf9f

Please sign in to comment.