diff --git a/disnake/interactions/base.py b/disnake/interactions/base.py index bf70f6163e..92b69a2cac 100644 --- a/disnake/interactions/base.py +++ b/disnake/interactions/base.py @@ -247,7 +247,6 @@ def __init__(self, *, data: InteractionPayload, state: ConnectionState) -> None: ) self._permissions = int(member.get("permissions", 0)) elif user := data.get("user"): - # TODO: this shouldn't store users, since they don't necessarily get evicted self.author = self._state.store_user(user) # TODO: consider making this optional in 3.0 @@ -335,16 +334,12 @@ def permissions(self) -> Permissions: def app_permissions(self) -> Permissions: """:class:`Permissions`: The resolved permissions of the bot in the channel, including overwrites. - In a guild context, this is provided directly by Discord. - - In a non-guild context this will be an instance of :meth:`Permissions.private_channel`. - .. versionadded:: 2.6 + + .. versionchanged:: 2.10 + This is now always provided by Discord. """ - if self.guild_id: - return Permissions(self._app_permissions) - # TODO: this fallback should be unnecessary now - return Permissions.private_channel() + return Permissions(self._app_permissions) @utils.cached_slot_property("_cs_response") def response(self) -> InteractionResponse: diff --git a/disnake/types/interactions.py b/disnake/types/interactions.py index 968cdf1a0b..719cc12f23 100644 --- a/disnake/types/interactions.py +++ b/disnake/types/interactions.py @@ -24,8 +24,6 @@ ApplicationCommandType = Literal[1, 2, 3] -# TODO: naming? -# to quote the notion doc, "Not limited to application command interactions. Unfortunate naming here" InteractionContextType = Literal[1, 2, 3] # GUILD, BOT_DM, PRIVATE_CHANNEL