Skip to content
Merged
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
7 changes: 6 additions & 1 deletion discord/interactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
TextChannel,
VoiceChannel,
)
from .client import Client
from .commands import OptionChoice
from .embeds import Embed
from .guild import Guild
Expand All @@ -81,7 +82,6 @@
PartialMessageable,
]


MISSING: Any = utils.MISSING


Expand Down Expand Up @@ -189,6 +189,11 @@ def _from_data(self, data: InteractionPayload):
except KeyError:
pass

@property
def client(self) -> Client:
"""Returns the client that sent the interaction."""
return self._state._get_client()

@property
def guild(self) -> Optional[Guild]:
"""Optional[:class:`Guild`]: The guild the interaction was sent from."""
Expand Down