Custom Commands
Arguments
Slash-command arguments and how they become placeholders.
For slash triggers, define named arguments users must (or optionally can) pass. Arguments become placeholders inside the command body.
Argument types#
string
Text input.
number
Integer input.
user
Pick a user, argument becomes their user ID.
channel
Pick a channel, argument becomes its channel ID.
role
Pick a role, argument becomes its role ID.
boolean
True/false toggle.
Placeholders in visual mode#
Reference arguments as {argname} in any action parameter. For user/channel/role types, {argname_mention} gives you a proper Discord mention.
Handling optional arguments#
In visual mode, use {if:{argname}|value if set|value if empty} for inline branching. For anything more complex, switch to AuditScript.
auditscriptif arg('mood') == "" then reply("Hello ${arg('name')}!") else reply("Hello ${arg('name')}, doing ${arg('mood')}.") end