Checkbox

Signature

export declare class Checkbox extends BaseComponentBuilder<APICheckboxComponent>

Properties

0

No properties.

Methods

4

Methods

setId(id: number): this;

Sets the ID for the checkbox.

Parameters
id
The ID for the checkbox.
Returns

The current Checkbox 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.

Parameters
customId
The custom ID for the checkbox.
Returns

The current Checkbox instance.

setDefault(value: boolean): this;

Sets whether the checkbox is selected by default.

Parameters
value
Whether the checkbox is selected by default.
Returns

The current Checkbox instance.