class CommandBuilder

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

Type Parameters

protectedreadonly
data : CommandData

clearDefaultMemberPermissions() : this

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

setContexts() : this

Sets the contexts of this command.

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

setIntegrationTypes() : this

Sets the integration types of this command.

setNSFW(
nsfw?: boolean
) : this

Sets whether this command is NSFW.

abstract
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.