diff --git a/discord/interactions.py b/discord/interactions.py index 9fcbc3c1ce..5963b4434c 100644 --- a/discord/interactions.py +++ b/discord/interactions.py @@ -59,6 +59,7 @@ TextChannel, VoiceChannel, ) + from .client import Client from .commands import OptionChoice from .embeds import Embed from .guild import Guild @@ -81,7 +82,6 @@ PartialMessageable, ] - MISSING: Any = utils.MISSING @@ -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."""