option

inline fun option(label: String, value: String, builder: SelectOptionBuilder.() -> Unit = {})(source)

Deprecated (with error)

This is only available for 'ComponentType.StringSelect' (in the 'StringSelectBuilder' subclass).

Replace with

import dev.kord.rest.builder.component.StringSelectBuilder
import dev.kord.rest.builder.component.option
(this as? StringSelectBuilder)?.option(label, value, builder)

Adds a new option to the select menu with the given label and value and configured by the builder.

Parameters

label

The user-facing name of the option, max 100 characters.

value

The dev-defined value of the option, max 100 characters.