CheckboxWidget

A checkbox widget that supports a single checkbox.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard

Whether the checkbox is selected by default.

Link copied to clipboard
open override var description: Key?

An optional description for the Widget. Displayed on Discord.

Link copied to clipboard
open override var height: Int

How tall this component is, in grid cells.

Link copied to clipboard
var id: String

The widget's unique ID on Discord, defaulting to a UUID.

Link copied to clipboard
open lateinit override var label: Key

The Widget's label, displayed on Discord.

Link copied to clipboard
open override var value: Boolean?

The final value stored in this widget, as provided by the user.

Link copied to clipboard
open override var width: Int

How wide this component is, in grid cells.

Functions

Link copied to clipboard
open suspend override fun apply(builder: LabelComponentBuilder, locale: Locale)

suspend override fun apply(builder: ModalBuilder, locale: Locale)

Function called to apply this component to a Discord form.

Link copied to clipboard
open override fun getKoin(): Koin

Get the associated Koin instance.

Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
open override fun validate()

Function called to ensure that this component was set up correctly.