We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
client
Interaction
1 parent 4514fe1 commit 0fc0afdCopy full SHA for 0fc0afd
discord/interactions.py
@@ -59,6 +59,7 @@
59
TextChannel,
60
VoiceChannel,
61
)
62
+ from .client import Client
63
from .commands import OptionChoice
64
from .embeds import Embed
65
from .guild import Guild
@@ -81,7 +82,6 @@
81
82
PartialMessageable,
83
]
84
-
85
MISSING: Any = utils.MISSING
86
87
@@ -189,6 +189,11 @@ def _from_data(self, data: InteractionPayload):
189
except KeyError:
190
pass
191
192
+ @property
193
+ def client(self) -> Client:
194
+ """Returns the client that sent the interaction."""
195
+ return self._state._get_client()
196
+
197
@property
198
def guild(self) -> Optional[Guild]:
199
"""Optional[:class:`Guild`]: The guild the interaction was sent from."""
0 commit comments