You are reading the documentation for the next version of discord.js. Documentation for v13/v14+ has been moved to old.discordjs.dev

SharedNameAndDescription

export declare class SharedNameAndDescription
export declare class SharedNameAndDescription
This mixin holds name and description symbols for slash commands.
Readonly
description_localizations?:LocalizationMap
The description localizations of this command.
Readonly
description:string
The description of this command.
Readonly
name_localizations?:LocalizationMap
The name localizations of this command.
Readonly
name:string
The name of this command.
setDescription(description):this
Sets the description of this command.
NameTypeOptionalDescription
descriptionstringNoThe description to use
setDescriptionLocalization(locale, localizedDescription):this
Sets a description localization for this command.
NameTypeOptionalDescription
localeLocaleStringNoThe locale to set
localizedDescriptionstring | nullNoThe localized description for the given locale
setDescriptionLocalizations(localizedDescriptions):this
Sets the description localizations for this command.
NameTypeOptionalDescription
localizedDescriptionsLocalizationMap | nullNoThe object of localized descriptions to set
setName(name):this
Sets the name of this command.
NameTypeOptionalDescription
namestringNoThe name to use
setNameLocalization(locale, localizedName):this
Sets a name localization for this command.
NameTypeOptionalDescription
localeLocaleStringNoThe locale to set
localizedNamestring | nullNoThe localized name for the given locale
setNameLocalizations(localizedNames):this
Sets the name localizations for this command.
NameTypeOptionalDescription
localizedNamesLocalizationMap | nullNoThe object of localized names to set