Actions & Side Effects
Use actions in Nevi custom commands to edit messages after a delay, auto-delete responses, and add emoji reactions.
Edit action
The {edit(seconds,content)} action edits the bot's response after a specified delay. This is great for countdown timers, reveal effects, or staged messages.
Syntax
{edit(seconds,new content)}seconds - How many seconds to wait before editing the message.
new content - The new content that will replace the original message. This can include variables and functions.
Example: Countdown reveal
/customcmd create reveal Thinking... {edit(3,The answer is: {random(yes,no,maybe)}!)}First shows "Thinking...", then after 3 seconds the message changes to reveal a random answer.
Example: Staged message
/customcmd create suspense Ready... {edit(2,Set...)} {edit(4,Go! Good luck, {user.name}!)}Shows "Ready...", edits to "Set..." after 2 seconds, then edits to "Go!" after 4 seconds.
Delete action
The {delete(seconds)} action automatically deletes the bot's response after a specified delay. This is useful for temporary messages, announcements that should disappear, or cleanup of command outputs.
Syntax
{delete(seconds)}seconds - How many seconds to wait before deleting the message.
Example: Temporary announcement
/customcmd create announce Attention everyone! {args} (This message will self-destruct in 30 seconds.) {delete(30)}Posts an announcement that automatically deletes itself after 30 seconds.
Example: Quick confirmation
/customcmd create done Done! {delete(5)}Sends a quick "Done!" confirmation that disappears after 5 seconds, keeping the channel clean.
React action
The {react(emoji1,emoji2)} action adds emoji reactions to the bot's response. You can add one or multiple reactions at once.
Syntax
{react(emoji1,emoji2,...)}Provide one or more emoji separated by commas. You can use standard Unicode emoji or custom server emoji.
Example: Quick poll
/customcmd create poll {args} - React to vote! {react(👍,👎)}Posts the poll question and automatically adds thumbs up and thumbs down reactions for voting.
Example: Rating
/customcmd create rate Rate {args}: {react(⭐)}Adds a star reaction so users can quickly show agreement.
Combining actions
You can use multiple actions in a single custom command. Actions don't interfere with each other. They are all scheduled independently after the message is sent.
Example: React and delete
/customcmd create confirm Got it! {react(✅)} {delete(10)}Adds a checkmark reaction to the response, then deletes the message after 10 seconds.
Example: Edit then delete
/customcmd create countdown 3... {edit(1,2...)} {edit(2,1...)} {edit(3,Go!)} {delete(6)}Counts down from 3 to "Go!", then removes the message after 6 seconds.
Creative examples
Here are some more creative ways to use actions in your custom commands.
Self-deleting announcement
/customcmd create alert Important: {args} (auto-deletes in 60s) {react(🚨)} {delete(60)}Posts an alert with a siren reaction that automatically cleans up after one minute.
Reaction poll with timer
/customcmd create quickpoll {args} - Vote now! You have 60 seconds. {react(👍,👎)} {edit(60,Poll closed! Results are in.)} {delete(120)}Creates a poll with thumbs up/down reactions. After 60 seconds the message changes to "Poll closed!", and after 120 seconds it cleans up entirely.
Mystery reveal
/customcmd create mystery {result = random(legendary,rare,common,epic)} Opening a mystery box... {react(🎁)} {edit(3,You got a {result} item! Congratulations, {user.name}!)}Adds a gift emoji reaction, shows a "opening" message, then reveals the random result after 3 seconds.
Related Commands
/customcmdmanagementRequires modCreate and manage custom commands with template support