ApplicationCommandBuilder
extends Base
Properties
.name
The command name
Type: string | null
.guild_id
The guild id of command
Type: Snowflake | null
.default_member_permissions
The command permissions
Type: string
.description
The command description
Type: string | null
.description_localizations
The command description localizations
Type: { [locale: string]: string }
.name_localizations
The command name localizations
Type: { [locale: string]: string }
.dm_permission
The command global mode
Type: boolean
.type
The command type
Type: number
.options
The command options
Type: RawApplicationCommandOptionData[]
Methods
.setName(name)
Set the command name
name
string
none
The command name
Returns: ApplicationCommandBuilder
.setGuildId(guildId)
Set the guild id of command
guildId
Snowflake
none
The guild id of command
Returns: ApplicationCommandBuilder
.setPermissions(permissions)
Set the command permissions
name
Permissions | Permissions[]
none
The command permissions
Returns: ApplicationCommandBuilder
.setDescription(description)
Set the command description
description
string
none
The command description
Returns: ApplicationCommandBuilder
.setDescriptionLocalizations(localizations)
Set the command description
localizations
{ [locale: string]: string }
none
The command description localizations
Returns: ApplicationCommandBuilder
.setNameLocalizations(localizations)
Set the command description
localizations
{ [locale: string]: string }
none
The command name localizations
Returns: ApplicationCommandBuilder
.setGlobal(global)
Set the command global
global
boolean
none
The command global
Returns: ApplicationCommandBuilder
.setType(type)
Set the command type
type
ApplicationCommandTypes
none
The command type
Returns: ApplicationCommandBuilder
.addUserOption(fn)
Add the user option
fn
(builder: UserOptionBuilder) => void
none
A function that returns an option builder
Returns: ApplicationCommandBuilder
.addSubcommandOption(fn)
Add the subcommand option
fn
(builder: SubcommandOptionBuilder) => void
none
A function that returns an option builder
Returns: ApplicationCommandBuilder
.addSubcommandGroupOption(fn)
Add the subcommand group option
fn
(builder: SubcommandGroupOptionBuilder) => void
none
A function that returns an option builder
Returns: ApplicationCommandBuilder
.addStringOption(fn)
Add the string option
fn
(builder: StringOptionBuilder) => void
none
A function that returns an option builder
Returns: ApplicationCommandBuilder
.addIntegerOption(fn)
Add the integer option
fn
(builder: IntegerOptionBuilder) => void
none
A function that returns an option builder
Returns: ApplicationCommandBuilder
.addBooleanOption(fn)
Add the boolean option
fn
(builder: BooleanOptionBuilder) => void
none
A function that returns an option builder
Returns: ApplicationCommandBuilder
.addChannelOption(fn)
Add the channel option
fn
(builder: ChannelOptionBuilder) => void
none
A function that returns an option builder
Returns: ApplicationCommandBuilder
.addRoleOption(fn)
Add the role option
fn
(builder: RoleOptionBuilder) => void
none
A function that returns an option builder
Returns: ApplicationCommandBuilder
.addMentionableOption(fn)
Add the mentionable option
fn
(builder: MentionableOptionBuilder) => void
none
A function that returns an option builder
Returns: ApplicationCommandBuilder
.addNumberOption(fn)
Add the number option
fn
(builder: NumberOptionBuilder) => void
none
A function that returns an option builder
Returns: ApplicationCommandBuilder
.addAttachmentOption(fn)
Add the attachment option
fn
(builder: AttachmentOptionBuilder) => void
none
A function that returns an option builder
Returns: ApplicationCommandBuilder
.toJSON()
Returns the properties of the class in the object type.
Returns: { [property: string]: any }
Last updated