Skip to content

Arguments and selections

Arguments receive information without rewriting the Kit for each use. Their names appear under @args, and command bindings are configured in Dash → Commands.

With numeric arguments price = 2 and quantity = 3:

Total: $(@args.price * @args.quantity)

Result:

Total: 6

Define price and quantity under the Kit’s arguments with the Number or Integer type. Enter those values in Send → Channel, or bind a custom command’s options to the matching Kit arguments. The built-in /kit selects a saved Kit by name or ID. Use it with a Kit whose arguments are all optional.

For an optional argument, set a default in the Kit or use a fallback such as $(@args.quantity ?? 1) in the message. ?? keeps a supplied zero.

Kit arguments can be text, integers, numbers, booleans, Discord IDs, colors, or URLs. When a custom command binds a user, role, or channel option to a Discord ID argument, the option supplies an entity with properties such as .name and .id. An ID entered directly in the browser stays exact text.

Mentionable input becomes a user or role when its identity is resolved. Otherwise it remains exact ID text without guessing an entity kind.

String selects supply the internal option values under @values, rather than their visible labels. For selected values news and chat:

Selected: $join(@values, ", ")

Result:

Selected: news, chat

User, role and channel selects supply lists of entities instead. Iterate them to choose whether to show each name or mention.

Keep the value music if you rename the label to Music and rhythm. The test "music" in @values still works. The custom_id identifies the component itself. Neither field is evaluated as a template. See Sources for where to write the response.