Skip to content

Commit

Permalink
App Directory warning
Browse files Browse the repository at this point in the history
  • Loading branch information
NeloBlivion authored and Lulalaby committed Nov 10, 2022
1 parent 6d25027 commit f7bf490
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions discord/commands/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -632,6 +632,7 @@ class SlashCommand(ApplicationCommand):
Whether the command should only be usable inside a guild.
nsfw: :class:`bool`
Whether the command should be restricted to 18+ channels and users.
Apps intending to be listed in the App Directory cannot have NSFW commands.
default_member_permissions: :class:`~discord.Permissions`
The default permissions a member needs to be able to run the command.
cog: Optional[:class:`Cog`]
Expand Down Expand Up @@ -1068,6 +1069,7 @@ class SlashCommandGroup(ApplicationCommand):
Whether the command should only be usable inside a guild.
nsfw: :class:`bool`
Whether the command should be restricted to 18+ channels and users.
Apps intending to be listed in the App Directory cannot have NSFW commands.
default_member_permissions: :class:`~discord.Permissions`
The default permissions a member needs to be able to run the command.
checks: List[Callable[[:class:`.ApplicationContext`], :class:`bool`]]
Expand Down Expand Up @@ -1222,6 +1224,7 @@ def create_subgroup(
Whether the command should only be usable inside a guild.
nsfw: :class:`bool`
Whether the command should be restricted to 18+ channels and users.
Apps intending to be listed in the App Directory cannot have NSFW commands.
default_member_permissions: :class:`~discord.Permissions`
The default permissions a member needs to be able to run the command.
checks: List[Callable[[:class:`.ApplicationContext`], :class:`bool`]]
Expand Down Expand Up @@ -1393,6 +1396,7 @@ class ContextMenuCommand(ApplicationCommand):
Whether the command should only be usable inside a guild.
nsfw: :class:`bool`
Whether the command should be restricted to 18+ channels and users.
Apps intending to be listed in the App Directory cannot have NSFW commands.
default_member_permissions: :class:`~discord.Permissions`
The default permissions a member needs to be able to run the command.
cog: Optional[:class:`Cog`]
Expand Down
2 changes: 2 additions & 0 deletions discord/commands/permissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ def is_nsfw() -> Callable:
"""A decorator that limits the usage of a slash command to 18+ channels and users.
In guilds, the command will only be able to be used in channels marked as NSFW.
In DMs, users must have opted into age-restricted commands via privacy settings.
Note that apps intending to be listed in the App Directory cannot have NSFW commands.
Example
-------
Expand Down

0 comments on commit f7bf490

Please sign in to comment.