Customization

Custom Commands

Create your own commands with dynamic responses, variables, and code blocks. Build anything from simple text responses to complex interactive commands.

Overview

Custom commands let you create personalized commands for your server. Whether you need simple FAQ responses, welcome messages, or complex commands with logic, Natsumi's custom command system has you covered.

Text Responses

Simple text or embed responses

Code Blocks

Logic, conditions, and loops

Variables

Dynamic user and server data

Rich Embeds

Beautiful formatted messages

Creating Commands

Basic Command

Create a simple text response command:

Create Command
/customcommand create name:rules response:Please read our rules in #rules!

Command with Variables

Use variables to include dynamic content:

Dynamic Response
/customcommand create name:hello response:Hello {user.mention}! Welcome to {server.name}!

Managing Commands

CommandDescription
/customcommand createCreate a new custom command
/customcommand editEdit an existing command
/customcommand deleteDelete a custom command
/customcommand listView all custom commands
/customcommand infoView details of a command

Variables

Variables let you insert dynamic content into your responses. They are wrapped in curly braces {variable}.

User Variables

{user}Username
{user.mention}@mention the user
{user.id}User's Discord ID
{user.tag}Username#0000
{user.avatar}Avatar URL
{user.joinedAt}Server join date
{user.createdAt}Account creation date

Server Variables

{server.name}Server name
{server.id}Server ID
{server.icon}Server icon URL
{server.members}Total member count
{server.owner}Server owner

Channel Variables

{channel}Channel name
{channel.mention}#channel mention
{channel.id}Channel ID

Other Variables

{args}All arguments
{args.1}First argument
{args.2}Second argument
{time}Current time
{date}Current date
{random.1-100}Random number

Code Blocks

Code blocks allow you to add logic, conditions, and advanced functionality to your custom commands. They use a simple scripting syntax.

Basic Syntax

Code blocks are wrapped in {code} tags:

Code Block Syntax
{code}
// Your code here
{/code}

If/Else Conditions

Execute different responses based on conditions:

Conditional Response
{code}
if ({user.hasRole:Verified}) {
    {respond: Welcome back, verified member!}
} else {
    {respond: Please verify yourself in #verify}
}
{/code}

Comparison Operators

OperatorDescriptionExample
==Equal to{args.1} == "hello"
!=Not equal to{args.1} != ""
>Greater than{user.level} > 10
<Less than{user.balance} < 100
>=Greater or equal{server.members} >= 1000
<=Less or equal{args.1} <= 50

Logical Operators

Multiple Conditions
{code}
// AND condition
if ({user.hasRole:VIP} && {user.level} >= 10) {
    {respond: You have access to VIP features!}
}

// OR condition  
if ({user.hasRole:Mod} || {user.hasRole:Admin}) {
    {respond: You are a staff member!}
}
{/code}
Pro Tip

Use the dashboard's code editor for a better experience when creating complex code blocks with syntax highlighting.

Functions

Functions perform actions within your code blocks:

Response Functions

{respond: text}

Send a text response

{dm: text}

DM the user

{react: emoji}

Add a reaction

{delete}

Delete the trigger message

Role Functions

{role.add: RoleName}

Give a role to the user

{role.remove: RoleName}

Remove a role from user

{user.hasRole: RoleName}

Check if user has role

Utility Functions

{set: var=value}

Set a variable

{math: 1+1}

Perform calculations

{choose: a|b|c}

Random selection

{wait: 5}

Wait seconds

Economy Functions

{balance.add: 100}

Add coins to user

{balance.remove: 50}

Remove coins from user

{user.balance}

Get user's balance

Embeds

Create rich embed messages with titles, descriptions, colors, and more:

Embed Syntax
{embed}
{title: Welcome!}
{description: Hello {user.mention}, welcome to {server.name}!}
{color: #00A896}
{thumbnail: {user.avatar}}
{footer: Thanks for joining!}
{/embed}

Embed Properties

{title: text}Embed title
{description: text}Main content
{color: #hex}Side bar color
{thumbnail: url}Small image (top right)
{image: url}Large image (bottom)
{footer: text}Footer text
{author: name|icon|url}Author section
{field: name|value|inline}Add fields
{timestamp}Current timestamp

Multiple Fields

Fields Example
{embed}
{title: User Info}
{color: #00A896}
{field: Username|{user}|true}
{field: ID|{user.id}|true}
{field: Joined|{user.joinedAt}|false}
{thumbnail: {user.avatar}}
{/embed}

Examples

🎲 8-Ball Command

Fun
{code}
{set: answer={choose: Yes|No|Maybe|Definitely|Ask again later|I don't think so|Absolutely!|Not a chance}}
{/code}
🎱 **Question:** {args}
**Answer:** {answer}

🎫 Apply Command

Utility
{code}
if ({user.hasRole:Applied}) {
    {respond: You have already applied!}
} else {
    {role.add: Applied}
    {dm: Thanks for applying! We'll review your application soon.}
    {respond: ✅ Application submitted! Check your DMs.}
}
{/code}

💰 Daily Reward

Economy
{code}
{set: reward={random.50-150}}
{balance.add: {reward}}
{/code}
{embed}
{title: 💰 Daily Reward}
{description: You received **{reward}** coins!}
{color: #FFD700}
{footer: New balance: {user.balance} coins}
{/embed}

📊 Server Stats

Info
{embed}
{title: 📊 {server.name} Stats}
{thumbnail: {server.icon}}
{color: #00A896}
{field: 👥 Members|{server.members}|true}
{field: 💬 Channels|{server.channels}|true}
{field: 👑 Owner|{server.owner}|true}
{field: 📅 Created|{server.createdAt}|false}
{timestamp}
{/embed}

🎭 Role Check

Moderation
{code}
if ({user.hasRole:VIP}) {
    {respond: 🌟 You are a VIP member! Enjoy your perks.}
} else if ({user.level} >= 20) {
    {respond: 📈 You're level {user.level}! Reach level 25 to become VIP.}
} else {
    {respond: Keep chatting to level up and unlock VIP!}
}
{/code}
Dashboard Editor

For complex commands, use the dashboard's visual editor with syntax highlighting, error checking, and live preview.