Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for nsfw commands #725

Merged
merged 2 commits into from
Jan 24, 2023
Merged

Add support for nsfw commands #725

merged 2 commits into from
Jan 24, 2023

Conversation

lukellmann
Copy link
Member

@lukellmann lukellmann commented Nov 18, 2022

The DSL looks like this:

val command = kord.createGlobalChatInputCommand(
    name = "restricted-command",
    description = "Only for users > 18",
) {
    nsfw = true
    dmPermission = true
}
println(command.isNsfw)

see discord/discord-api-docs#5617

The DSL looks like this:
val command = kord.createGlobalChatInputCommand(
    name = "restricted-command",
    description = "Only for users > 18",
) {
    nsfw = true
    dmPermission = true
}
println(command.nsfw)

see discord/discord-api-docs#5617
@lukellmann
Copy link
Member Author

Draft for now since discord/discord-api-docs#5617 is also still a draft.

This is consistent with the naming for other core entities like
TextChannel.isNsfw.
@lukellmann lukellmann marked this pull request as ready for review December 23, 2022 22:49
@lukellmann
Copy link
Member Author

Ready for review, the PR has been merged on discord's side.

@lukellmann lukellmann merged commit 7e4e309 into 0.8.x Jan 24, 2023
lukellmann added a commit that referenced this pull request Jan 24, 2023
The DSL looks like this:
val command = kord.createGlobalChatInputCommand(
    name = "restricted-command",
    description = "Only for users > 18",
) {
    nsfw = true
    dmPermission = true
}
println(command.nsfw)

see discord/discord-api-docs#5617
@lukellmann lukellmann deleted the nsfw-commands branch January 25, 2023 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant