Search...

SlashCommandSubcommandGroupBuilder

Represents a folder for subcommands.
export declare class SlashCommandSubcommandGroupBuilder implements ToAPIApplicationCommandOptions 
export declare class SlashCommandSubcommandGroupBuilder implements ToAPIApplicationCommandOptions 
Readonly

description

:

string

The description of this subcommand group.
Readonly

name

:

string

The name of this subcommand group.
The subcommands within this subcommand group.

addSubcommand(input)

:

this

Adds a new subcommand to this group.
NameTypeOptionalDescription
inputSlashCommandSubcommandBuilder | ((subcommandGroup: SlashCommandSubcommandBuilder) => SlashCommandSubcommandBuilder)NoA function that returns a subcommand builder or an already built builder
Serializes this builder to API-compatible JSON data.
Remarks
This method runs validations on the data before serializing it. As such, it may throw an error if the data is invalid.