Custom Commands Overview
Create your own commands with dynamic responses using Nevi's template language. Variables, functions, conditionals, embeds, and economy integration.
What are custom commands?
Custom commands let you create your own slash commands with dynamic, template-powered responses. Instead of being limited to Nevi's built-in commands, you can build commands that greet users by name, roll dice, run mini-games, display server stats, interact with the economy system, and much more.
Every custom command response is processed through Nevi's template language, a system of variables, functions, conditionals, and actions enclosed in curly braces. A response can be as simple as a static message or as complex as a conditional economy-gated embed with timed edits.
Quick example
A command that greets the user and tells them how many members are in the server:
/customcmd create hello Hey {user.name}! Welcome to {server} - we have {server.memberCount} members!Creating a custom command
Use the /customcmd create command to make a new custom command. You provide the name and the response template.
Syntax
/customcmd create <name> <response>name - The name of the command. This is what users will type to trigger it (e.g., hello becomes /hello).
response - The response template. Can include plain text, variables, functions, conditionals, actions, and embeds.
Examples
/customcmd create hello Hello, {user.name}!
/customcmd create roll {user.name} rolled a {random(1,2,3,4,5,6)}!
/customcmd create serverinfo {server} has {server.memberCount} members!
The template language
Nevi's template language is the engine behind custom command responses. Everything inside curly braces {} is evaluated as a template expression. The language includes several categories of features:
Variables
Access user info, server details, arguments, and time. Examples: {user.name}, {server.memberCount}, {args}.
Functions
Transform text, generate random values, do math, and add conditionals. Examples: {upper(text)}, {random(a,b,c)}, {if(cond:then:else)}.
Actions
Trigger side effects like editing, deleting, or reacting to the response. Examples: {edit(5,new content)}, {delete(10)}, {react(emoji)}.
Embeds
Create rich embeds with titles, descriptions, colors, and fields. Example: {embed.title:"Title".description:"Desc"}.
Read the full Template Syntax guide for details on how expressions are parsed and evaluated.
Managing custom commands
Once you've created custom commands, you can list, edit, and delete them using the /customcmd subcommands.
List all commands
/customcmd listShows all custom commands in the server along with their response templates.
Edit a command
/customcmd edit <name> <new_response>Updates the response template for an existing command. The name stays the same.
Delete a command
/customcmd delete <name>Permanently removes a custom command from the server. This also removes all of its aliases.
Permissions
Creating, editing, and deleting custom commands requires admin-level permissions in Nevi. This means you need either the Administrator permission in Discord or be assigned an admin role in Nevi's permission system.
However, running custom commands has no special permission requirements. Any server member can use them unless you restrict the channel with Discord's built-in slash command permissions.
Tip
If you want to restrict who can use a specific custom command, you can use Discord's Server Settings > Integrations > Nevi to manage command permissions per role or channel.
Related Commands
/customcmdmanagementRequires modCreate and manage custom commands with template support