CheckboxGroup
Signature
export declare class CheckboxGroup extends BaseComponentBuilder<APICheckboxGroupComponent>Properties
1Methods
8Properties
#private;Methods
constructorConstructorconstructor(data?: Partial<APICheckboxGroupComponent>);setId(id: number): this;Sets the ID for the checkbox group.
Parameters
id- The ID for the checkbox group.
Returns
The current CheckboxGroup instance.
@remarksThe ID is used by Discord to identify the component when an interaction is received. It must be unique within the message.
setCustomId(customId: string): this;Sets the custom ID for the checkbox group.
Parameters
customId- The custom ID for the checkbox group.
Returns
The current CheckboxGroup instance.
setSelectionLimit({ max, min }: Partial<OptionValuesLength>): this;Sets the maximum and minimum number of selected values for the checkbox group. [max = options length] 10, [min = 1] 0
Parameters
options- The maximum and minimum values.
Returns
The current CheckboxGroup instance.
setRequired(required: boolean): this;Sets whether the checkbox group is required.
Parameters
required- Whether the checkbox group is required (true by discord side).
Returns
The current CheckboxGroup instance.
setOptions(...options: RestOrArray<CheckboxGroupOption>): this;addOptions(...options: RestOrArray<CheckboxGroupOption>): this;toJSON(): APICheckboxGroupComponent;