Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(docs): add entitlements to interaction subclasses #1171

Merged
merged 1 commit into from
Mar 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading