Tutorials
Your First Script
Create, run, edit, and inspect a personal command.
This page is not available in ja yet, so the en version is being shown.
This tutorial creates a personal ping command. Personal scripts belong to your Discord
account and do not require server management permission.
Create It
Run this slash command:
/new name:ping scope:user source:macchi.reply("Pong!")
Leave type as Custom Command and scope as User. Macchi checks the Lua syntax and
opens the new script’s control panel.
Run It
Use either form:
/run script:u123/ping@0
&run ping
The second form uses your current prefix. Run /prefix if you do not know it. Both
routes execute the same saved script and should reply with Pong!.
Use Context
Open /list, choose your draft, select Edit source, and replace the source with:
macchi.reply("Pong, " .. ctx.user.username .. "!")
Run it again. ctx.user describes the person who triggered this execution; it does not
persist into later runs.
Common Errors
- Names use lowercase letters, numbers,
-, or_, and cannot be built-in command names. - Source is limited to 3000 characters.
-
/check source:macchi.reply("Pong!")validates transient Lua source and offers bounded run
options. Slash results are private; text-command source is visible in the channel. - An inactive script remains saved but cannot run.
Next, add interactive buttons or turn a script into
channel automation.