Skip to content
Components & Interactions option

$option — Returns an option value with given name (interaction command)

Returns an option value with given name (interaction command)

Syntax

$option[optionname]

Parameters

  • optionname (text, required) — The option name to retrieve its value

Return Value

  • Unknown.

Usage

$option[optionname] → result

Example

$option[color]

Try it

Paste an example into the playground to preview its message (functions that act on Discord are not run), or build the same thing with blocks.