SharedChatInputCommandOptions

export declare class SharedChatInputCommandOptions
export declare class SharedChatInputCommandOptions
This mixin holds symbols that can be shared in chat input command options.
ProtectedReadonly
Readonly
options:readonly ApplicationCommandOptionBase[]
addAttachmentOptions(...options):this
Adds attachment options.
NameTypeOptionalDescription
...optionsRestOrArray<ChatInputCommandAttachmentOption | ((builder: ChatInputCommandAttachmentOption) => ChatInputCommandAttachmentOption)>NoOptions to add
addBooleanOptions(...options):this
Adds boolean options.
NameTypeOptionalDescription
...optionsRestOrArray<ChatInputCommandBooleanOption | ((builder: ChatInputCommandBooleanOption) => ChatInputCommandBooleanOption)>NoOptions to add
addChannelOptions(...options):this
Adds channel options.
NameTypeOptionalDescription
...optionsRestOrArray<ChatInputCommandChannelOption | ((builder: ChatInputCommandChannelOption) => ChatInputCommandChannelOption)>NoOptions to add
addIntegerOptions(...options):this
Adds integer options.
NameTypeOptionalDescription
...optionsRestOrArray<ChatInputCommandIntegerOption | ((builder: ChatInputCommandIntegerOption) => ChatInputCommandIntegerOption)>NoOptions to add
addMentionableOptions(...options):this
Adds mentionable options.
NameTypeOptionalDescription
...optionsRestOrArray<ChatInputCommandMentionableOption | ((builder: ChatInputCommandMentionableOption) => ChatInputCommandMentionableOption)>NoOptions to add
addNumberOptions(...options):this
Adds number options.
NameTypeOptionalDescription
...optionsRestOrArray<ChatInputCommandNumberOption | ((builder: ChatInputCommandNumberOption) => ChatInputCommandNumberOption)>NoOptions to add
addRoleOptions(...options):this
Adds role options.
NameTypeOptionalDescription
...optionsRestOrArray<ChatInputCommandRoleOption | ((builder: ChatInputCommandRoleOption) => ChatInputCommandRoleOption)>NoOptions to add
addStringOptions(...options):this
Adds string options.
NameTypeOptionalDescription
...optionsRestOrArray<ChatInputCommandStringOption | ((builder: ChatInputCommandStringOption) => ChatInputCommandStringOption)>NoOptions to add
addUserOptions(...options):this
Adds user options.
NameTypeOptionalDescription
...optionsRestOrArray<ChatInputCommandUserOption | ((builder: ChatInputCommandUserOption) => ChatInputCommandUserOption)>NoOptions to add
spliceOptions(index, deleteCount, ...options):this
Removes, replaces, or inserts options for this command.
Remarks
This method behaves similarly to Array.prototype.splice().It's useful for modifying and adjusting order of the already-existing options for this command.
Example
Remove the first option:
actionRow.spliceOptions(0, 1);
actionRow.spliceOptions(0, 1);
Example
Remove the first n options:
const n = 4;
actionRow.spliceOptions(0, n);
const n = 4;
actionRow.spliceOptions(0, n);
Example
Remove the last option:
actionRow.spliceOptions(-1, 1);
actionRow.spliceOptions(-1, 1);
NameTypeOptionalDescription
indexnumberNoThe index to start at
deleteCountnumberNoThe number of options to remove
...optionsApplicationCommandOptionBase[]NoThe replacing option objects