Piecewise

Build chat bots with blocks

🗣️ get (type) option with name (argument)

In Discord → Interactions → Application Commands

Jump to block

Get an argument from a command invocation.

Only valid in: discord command create

Requires the following blocks to be present in the project: discord login

Parameters

Parameter name Parameter type Required? Description
type any The type of argument. This should match what you’ve declared in option with…, otherwise you might get weird results.
argument String The name of the argument to fetch. This should match what you’ve declared in option with….

Output

String, Number, Boolean, user, channel, role - The user-supplied value. If the supplied value is an attachment, this is the attachment URL. Otherwise, this is the literal value entered.