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
Summary
Properties
CheckboxGroup.customId :: string?CheckboxGroup.options :: { apiTypes.RadioGroupOptionObject }CheckboxGroup.required :: boolean?Methods
CheckboxGroup:setCustomId(customId: string) → CheckboxGroupCheckboxGroup:addOption(label: string, value: string, description: string?, emoji: apiTypes.EmojiObject?, default: boolean?) → CheckboxGroupCheckboxGroup:setRequired(required: boolean) → CheckboxGroupCheckboxGroup:build() → JSONFunctions
CheckboxGroup.new() → CheckboxGroupProperties
Section titled “Properties”customId
Section titled “customId”Developer-defined identifier; 1-100 characters.
options
Section titled “options” CheckboxGroup.options :: RadioGroupOptionObject }
Array of checkbox options; max 10.
required
Section titled “required”Whether required in modal (defaults to true).
Methods
Section titled “Methods”setCustomId
Section titled “setCustomId”CheckboxGroup : setCustomId ( customId ) -> CheckboxGroup
Sets the developer-defined identifier. 1-100 characters.
Parameters
| customId: string |
Returns
| CheckboxGroup |
addOption
Section titled “addOption”CheckboxGroup : addOption ( label , value , description , emoji , default ) -> CheckboxGroup
Adds a checkbox option. Max 10 options.
Returns
| CheckboxGroup |
setRequired
Section titled “setRequired”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 |
Functions
Section titled “Functions”CheckboxGroup . new ( ) -> CheckboxGroup
Responsible for creating a new CheckboxGroup.
Returns
| CheckboxGroup |