diff --git a/docs/guides/int_framework/permissions.md b/docs/guides/int_framework/permissions.md index e35bb162d..f02c50ebb 100644 --- a/docs/guides/int_framework/permissions.md +++ b/docs/guides/int_framework/permissions.md @@ -55,5 +55,10 @@ The amount of nesting you can do is realistically endless. > If the nested class is marked with `Group`, as required for setting up subcommands, this example will not work. > As mentioned before, subcommands cannot have seperate permissions from the top level command. +### NSFW Commands +Commands can be limited to only age restricted channels and DMs: + +[!code-csharp[Nsfw-Permissions](samples/permissions/nsfw-permissions.cs)] + [permissions]: xref:Discord.GuildPermission diff --git a/docs/guides/int_framework/samples/permissions/nsfw-permissions.cs b/docs/guides/int_framework/samples/permissions/nsfw-permissions.cs new file mode 100644 index 000000000..21f93b54d --- /dev/null +++ b/docs/guides/int_framework/samples/permissions/nsfw-permissions.cs @@ -0,0 +1,6 @@ +[NsfwCommand(true)] +[SlashCommand("beautiful-code", "Get an image of perfect code")] +public async Task BeautifulCodeAsync(...) +{ + ... +} \ No newline at end of file