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