mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-04-20 16:00:29 +00:00
parent
3b5cd3b92c
commit
b3a24846bd
@ -133,6 +133,7 @@ class Interaction:
|
||||
'guild_locale',
|
||||
'extras',
|
||||
'_permissions',
|
||||
'_app_permissions',
|
||||
'_state',
|
||||
'_client',
|
||||
'_session',
|
||||
@ -182,6 +183,7 @@ class Interaction:
|
||||
|
||||
self.user: Union[User, Member] = MISSING
|
||||
self._permissions: int = 0
|
||||
self._app_permissions: int = int(data.get('app_permissions', 0))
|
||||
|
||||
if self.guild_id:
|
||||
guild = self._state._get_or_create_unavailable_guild(self.guild_id)
|
||||
@ -236,6 +238,11 @@ class Interaction:
|
||||
"""
|
||||
return Permissions(self._permissions)
|
||||
|
||||
@property
|
||||
def app_permissions(self) -> Permissions:
|
||||
""":class:`Permissions`: The resolved permissions of the application or the bot, including overwrites."""
|
||||
return Permissions(self._app_permissions)
|
||||
|
||||
@utils.cached_slot_property('_cs_namespace')
|
||||
def namespace(self) -> Namespace:
|
||||
""":class:`app_commands.Namespace`: The resolved namespace for this interaction.
|
||||
|
@ -203,6 +203,7 @@ class _BaseInteraction(TypedDict):
|
||||
version: Literal[1]
|
||||
guild_id: NotRequired[Snowflake]
|
||||
channel_id: NotRequired[Snowflake]
|
||||
app_permissions: NotRequired[str]
|
||||
locale: NotRequired[str]
|
||||
guild_locale: NotRequired[str]
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user