class SlashCommandAttachmentOption
extends
ApplicationCommandOptionBaseexport declare class SlashCommandAttachmentOption extends ApplicationCommandOptionBaseA slash command attachment option.
readonlyoptionaldescription_localizations? : LocalizationMap
The description localizations of this command.
Inherited from: SharedNameAndDescription
readonlydescription : string
The description of this command.
Inherited from: SharedNameAndDescription
readonlyoptionalfile_types? : FileUploadType[]
The file types allowed for this attachment option.
readonlyoptionalname_localizations? : LocalizationMap
The name localizations of this command.
Inherited from: SharedNameAndDescription
readonlyrequired : boolean = false
Whether this option is required.
Inherited from: ApplicationCommandOptionBase
readonlytype : ApplicationCommandOptionType.Attachment
The type of this option.
addFileTypes(...fileTypes: RestOrArray<FileUploadType>) : this
Adds file types allowed for this attachment option.
protected runRequiredValidations() : void
This method runs required validators on this builder.
Inherited from: ApplicationCommandOptionBase
setDescription(description: string) : this
Sets the description of this command.
Inherited from: SharedNameAndDescription
setDescriptionLocalization(locale: LocaleString) : this
Sets a description localization for this command.
Inherited from: SharedNameAndDescription
setDescriptionLocalizations(localizedDescriptions: LocalizationMap | null) : this
Sets the description localizations for this command.
Inherited from: SharedNameAndDescription
setFileTypes(...fileTypes: RestOrArray<FileUploadType>) : this
Sets the file types allowed for this attachment option.
setNameLocalization(locale: LocaleString) : this
Sets a name localization for this command.
Inherited from: SharedNameAndDescription
setNameLocalizations(localizedNames: LocalizationMap | null) : this
Sets the name localizations for this command.
Inherited from: SharedNameAndDescription
setRequired(required: boolean) : this
Sets whether this option is required.
Inherited from: ApplicationCommandOptionBase
toJSON() : APIApplicationCommandAttachmentOption
Serializes this builder to API-compatible JSON data.