New Typed Slash Option (Expression) — DiSky

Addon: DiSky · Category: Expression · Since: 5.0.0-a2

Syntax

[a] new typed %*type% [slash] option (named|with [the] name) %text% with [the] desc[ription] %text%

Description

Creates a slash option from a Skript type instead of a Discord option type: a member, a colour, a text channel, a player, or any enum (its constants become the choices, or an autocomplete past 25). The same types work as '<name: type>' arguments of a 'slash command' structure. Read the value back with 'slash option "name"' (as the Discord type) or, in a structure, as '{_name}'.

Examples

set {_opt} to a new typed member option named "target" with description "Who"
set {_opt} to a new typed gamemode option named "mode" with description "Which mode"

View source