class CommandBuilder

abstractexternal
declare abstract class CommandBuilder<Command extends RESTPostAPIApplicationCommandsJSONBody> implements JSONEncodable<Command>

Type Parameters

protectedreadonlyexternal
data : CommandData

external
clearDefaultMemberPermissions() : this

Clears the default permissions a member should have in order to run the command.

external
setContexts() : this

Sets the contexts of this command.

external
setDefaultMemberPermissions(
permissions: Permissions | bigint | number
) : this

Sets the default permissions a member should have in order to run the command.

See also: https://discord.com/developers/docs/interactions/application-commands#permissions

external
setIntegrationTypes() : this

Sets the integration types of this command.

external
setNSFW(
nsfw?: boolean
) : this

Sets whether this command is NSFW.

abstractexternal
toJSON(
validationOverride?: boolean
) : Command

Serializes this builder to API-compatible JSON data.Note that by disabling validation, there is no guarantee that the resulting object will be valid.