Custom Commands
Custom commands let you create powerful automated responses and light automation using a simple line-based scripting language. Trigger them with l!trigger (prefix commands).
How they work
Type l!something in a channel. Lunova looks up a custom command with that trigger and runs the saved script line by line.
Commands are case-insensitive and only the first word after l! is used as the trigger. Everything after it becomes arguments (see below).
Editor improvements
The dashboard editor now includes:
- One-click keyword insertion toolbar
- Ready-made example templates (basic greet, arguments, role gates, permission checks)
- Live validation + character / executable line counters
- Submit is blocked while there are errors
Language reference (written to be readable)
The language tries to read like normal instructions. You can still use the old ALL-CAPS style if you prefer (it still works for advanced users).
Everyday actions (friendly style)
say "Hello {user}!"โ post a message (you can also write reply, send, or tell them)dm the user "Thanks for joining!"react with "๐"give the "Member" roleremove the "Muted" role from themset their nickname to "CoolPerson"delete the command messagewait 2โ pause a couple of secondssend to "welcome-log" "Someone just used the command"
Arguments (what the person typed after l!command)
If someone types l!suggest better music:
{args}= everything after the command (better music){arg1},{arg2}โฆ = individual words{argcount}= how many words they gave
Useful guards:
require at least 1 argumentrequire the "VIP" role "This is for VIPs only."
Making things conditional (if / otherwise)
if the user has the "VIP" role
say "Welcome back, VIP!"
otherwise
say "Hey {user}! Enjoy your stay."
give the "Member" role
end ifYou can also check permissions:
if they can moderate members say "Thanks for helping moderate!" end if
Old "machine" style (still works)
For people who want full control or already have scripts:
REPLY "text",GIVE_ROLE "Name",IF_ROLE "Name",IF_HAS_PERM "ModerateMembers",REQUIRE_ROLE, etc.
The editor and validator understand both styles.
Variables (usable inside quoted strings)
{user}โ mention the runner{username}โ plain username{server}โ server name{membercount}โ current member count{channel}โ mention of the current channel{args},{arg1}โฆ ,{argcount}โ see Arguments section
Full friendly example
# l!greet @friend hello there
require at least 1 argument
if the user has the "VIP" role
say "VIP {username} says: {args}"
otherwise
say "{user} says: {arg1}"
end ifLimits & safety
- Max script length: ~3000 characters
- Max executable lines: 40 (comments and blank lines don't count)
- Role and nickname commands are blocked if the bot or the person running the command doesn't have the right permissions in Discord.
- Per-user rate limiting (prevents spam)
- Respects the global "Custom commands enabled" setting
Managing commands
Use the dashboard (recommended) or /cclist to list them. You can edit, toggle, or delete commands from the dashboard at any time.
