Skip to content

CheckboxGroup

Implementation of Discord’s Checkbox Group component as a Luau builder. Multi-selectable group of checkboxes. Modal-only when using the required field.

https://docs.discord.com/developers/components/reference#checkbox-group

CheckboxGroup.customId  :: string?

Developer-defined identifier; 1-100 characters.

CheckboxGroup.options  :: RadioGroupOptionObject }

Array of checkbox options; max 10.

CheckboxGroup.required  :: boolean?

Whether required in modal (defaults to true).

CheckboxGroup : setCustomId ( customId )  -> CheckboxGroup

Sets the developer-defined identifier. 1-100 characters.

Parameters

customId: string

Returns

CheckboxGroup
CheckboxGroup : addOption ( label value description emoji default )  -> CheckboxGroup

Adds a checkbox option. Max 10 options.

Parameters

label: string
value: string
description: string?
emoji: EmojiObject?
default: boolean?

Returns

CheckboxGroup
CheckboxGroup : setRequired ( required )  -> CheckboxGroup

Sets whether this component is required in a modal.

Parameters

required: boolean

Returns

CheckboxGroup
CheckboxGroup : build ( )  -> JSON

Responsible for building the CheckboxGroup JSON that can be parsed by the Discord API.

Returns

JSON
CheckboxGroup . new ( )  -> CheckboxGroup

Responsible for creating a new CheckboxGroup.

Returns

CheckboxGroup