Repository: Rapptz/discord.py
File: discord/app_commands/models.py (Python)

Code before:
                self.id,
                payload,
            )
        return AppCommand(data=data, state=state)

    async def fetch_permissions(self, guild: Snowflake) -> GuildAppCommandPermissions:
        """|coro|

        Retrieves this command's permission in the guild.

        Parameters
        -----------
        guild: :class:`~discord.abc.Snowflake`
            The guild to retrieve the permissions from.

        Raises
        -------
        Forbidden
            You do not have permission to fetch application command's permissions.
        HTTPException
            Fetching the application command's permissions failed.
        MissingApplicationID
            The client does not have an application ID.
        NotFound
            The application command's permissions could not be found.
            This can indicate that the permissions are synced with the guild.

        Returns
        --------
        :class:`GuildAppCommandPermissions`
            An object representing the application command's permissions in the guild.
        """
        state = self._state
        if not state.application_id:
            raise MissingApplicationID

        data = await state.http.get_application_command_permissions(
            state.application_id,
            guild.id,
            self.id,
        )
        return GuildAppCommandPermissions(data=data, state=state, command=self)


class Choice(Generic[ChoiceT]):
    """Represents an application command argument choice.

    .. versionadded:: 2.0

    .. container:: operations


Review comment (security):
```suggestion
            This can also indicate that the permissions are synced with the guild
            (i.e. they are unchanged from the default).
```

Code after:
                payload,
            )
        return AppCommand(data=data, state=state)

    async def fetch_permissions(self, guild: Snowflake) -> GuildAppCommandPermissions:
        """|coro|

        Retrieves this command's permission in the guild.

        Parameters
        -----------
        guild: :class:`~discord.abc.Snowflake`
            The guild to retrieve the permissions from.

        Raises
        -------
        Forbidden
            You do not have permission to fetch the application command's permissions.
        HTTPException
            Fetching the application command's permissions failed.
        MissingApplicationID
            The client does not have an application ID.
        NotFound
            The application command's permissions could not be found.
            This can also indicate that the permissions are synced with the guild
            (i.e. they are unchanged from the default).

        Returns
        --------
        :class:`GuildAppCommandPermissions`
            An object representing the application command's permissions in the guild.
        """
        state = self._state
        if not state.application_id:
            raise MissingApplicationID

        data = await state.http.get_application_command_permissions(
            state.application_id,
            guild.id,
            self.id,
        )
        return GuildAppCommandPermissions(data=data, state=state, command=self)


class Choice(Generic[ChoiceT]):
    """Represents an application command argument choice.

    .. versionadded:: 2.0

    .. container:: operations