Skip to main content

Actions

Make a custom command ban, kick, warn, move coins, or write to the server database.
Actions let a custom command perform real operations. They reuse raze’s native moderation pipeline, so hierarchy checks, immunity, and case logging all apply.

Anatomy

  • Arguments inside an action are separated by &&.
  • The action tag is removed from the rendered message once it runs, so surrounding text stays visible.
  • Actions run near the end of the pipeline, after variables and database tags.
Warned @wanderer — case #104.

Naming a target

Anywhere an action expects a member you may pass: Roles accept a role mention, a role ID, or an exact role name. Durations accept combined units — 30s, 10m, 1h30m, 7d, 2w — and are capped at 28 days by Discord.

Moderation actions

{mod:mute} and {mod:unmute} are aliases for timeout and untimeout. Every one of these writes a moderation case and fills the {punishment.*} variables.
If the target is immune under your moderation settings, the action is skipped silently and no case is logged. Role actions also refuse roles that sit above raze or carry Administrator.

Economy actions (removed)

{econ:add}, {econ:remove}, {econ:set}, and {econ:transfer} no longer exist. raze’s economy is global — one balance per user across every server — so a Manage Server holder in any guild could have minted unlimited currency for themselves. Writing {econ:add ...} in a script now does nothing; the tag is left in the message as plain text.
The read-only economy variables are unaffected: {econ.balance}, {econ.wallet}, {econ.bank}, {target.econ.balance}, and the rest still work everywhere. See Economy data.

Custom database actions

These are the permission-gated, write-only form. To read a value, or to read back something you just wrote in the same response, use the inline database tags instead — those resolve earlier in the pipeline and render their result in place.

Permission gating

1

When you save the command

;cc set scans the script, works out which permissions its actions need, and refuses to save unless you hold every one of them.
2

When someone runs it

The invoker must hold those same permissions — unless a user or role allow entry covers them, which bypasses the action permission check.
An allowed channel does not bypass permissions. Only user and role allow entries do.
A misspelled operation such as {mod:bam ...} maps to no permission, so it is neither gated nor executed. If it is the only action in the script the tag is left in the message as literal text; alongside a valid action it is silently dropped. Either way, run ;cc preview before publishing.
Actions can also be attached to buttons and dropdown options; see Embeds and components.