Getting Modding
This guide shows how to create your own mod from scratch.
On this page14 sections
1. Create the mod folder
Inside mods/, create a folder for your mod.
Example:
text
mods/
My First JSON Mod/
installed.json
mod.json
Contents/
points.jsonRequired files:
mod.json: mod metadata shown in dashboards/toolsinstalled.json: guild IDs where this mod is activeContents/*.json: one or more blueprint files
2. Write mod.json
Use the same shape as other mods:
json
{
"name": "My First JSON Mod",
"author": "YourName",
"version": "1.0.0",
"size": "2 KB",
"credits": "Optional",
"description": "Replies with points when users type !points"
}3. Write installed.json
Add guild IDs where the mod should run.
json
{
"guilds": ["123456789012345678", "987654321098765432"]
}If guilds is empty, the mod is installed nowhere.
4. Blueprint format (Contents/*.json)
Every blueprint file must contain:
json
{
"nodes": [],
"connections": []
}Node structure
json
{
"id": 1,
"type": "WhenUser",
"x": 20,
"y": 30,
"data": {
"action": "SendsMessageContaining",
"content": "!points"
}
}id: unique number within that blueprinttype: block behaviorx,y: editor positions (safe to keep; runtime ignores them)data: type-specific config
Connection structure
json
{
"from": { "nodeId": 1, "pinId": "exec" },
"to": { "nodeId": 2, "pinId": "exec" }
}- Exec flow uses pins like
exec,true,false - Data flow uses value pins like
value,content,description,id,database
5. Supported trigger nodes
OnStart: runs when bot starts (for installed guilds)WhenUser: reacts to messages usingdata.actionand optionaldata.contentOnMessage: same trigger path asWhenUserOnReaction: reacts to reaction events
WhenUser actions:
SendsMessage: exact match withdata.content(or always true if empty)SendsMessageContaining: substring matchSendsAttachment: true when message has attachments
OnReaction actions:
Reacts: any reactionReactsWith: specific emoji fromdata.emoji
6. Logic and utility nodes
Branch
- Uses
data.condition - Supports
==,!=, andcontains - Routes execution to
trueorfalse
Delay
- Uses
data.durationin milliseconds
SetVariable
data.variableName- Stores resolved input value in runtime variables
GetVariable
data.variableName- Reads a variable and outputs
value
ConcatenateText
- Joins
text1+ optional separator +text2
FormatText
- Uses
data.template - Supports
{var1},{var2},{var3}and regular runtime placeholders
7. Messaging and member nodes
SendMessage
- Sends plain text to the current channel
SendEmbed
- Sends an embed with:
data.titledata.descriptiondata.color(hex without validation strictness; invalid values fallback)
GetUser
type: "Command Executor"(default) gets the triggering membertype: "Custom ID"usesdata.userId
AddRole/RemoveRole
- Uses role name from
data.roleName - Requires a valid member input (from
GetUseror trigger context)
8. Database nodes
Database files are stored automatically in data/<name>__<modFolder>.json.
The mod folder is appended to prevent collisions across mods.
AddDatabase
data.name: base database name (for exampleGuildData)data.fields: comma/newline separated fieldsdata.idType:GuildIDsorPlayerIDs
WriteToDatabase
- Input pin
databaseshould come fromAddDatabase(or equivalent object) data.fieldName: one or multiple fields- Input pin
valueordata.value - Optional input pin
idto override target row ID
ReadFromDatabase
- Input pin
database data.fieldName: one or multiple fields- Optional input pin
id - Single field returns that value
- Multiple fields return a JSON string and also set each field in runtime variables
9. Runtime placeholders
Strings in node data support placeholders:
{content}message content{userId}user ID{userTag}username#discriminator/tag{username}username{channelId}channel ID{guildId}guild ID{emoji}reaction emoji{modId}mod folder name
You can also use values created by variables and database reads:
{points}{level}{customVariable}
10. Full example: !points command
json
{
"nodes": [
{
"id": 1,
"type": "OnStart",
"x": 30,
"y": 30,
"data": {}
},
{
"id": 2,
"type": "AddDatabase",
"x": 250,
"y": 30,
"data": {
"name": "GuildPoints",
"fields": "points",
"idType": "PlayerIDs"
}
},
{
"id": 3,
"type": "WhenUser",
"x": 30,
"y": 260,
"data": {
"action": "SendsMessageContaining",
"content": "!points"
}
},
{
"id": 4,
"type": "ReadFromDatabase",
"x": 260,
"y": 260,
"data": {
"fieldName": "points"
}
},
{
"id": 5,
"type": "Branch",
"x": 510,
"y": 260,
"data": {
"condition": "{points}=="
}
},
{
"id": 6,
"type": "WriteToDatabase",
"x": 760,
"y": 180,
"data": {
"fieldName": "points",
"value": "0"
}
},
{
"id": 7,
"type": "SendMessage",
"x": 760,
"y": 180,
"data": {
"content": "You currently have 0 points."
}
},
{
"id": 8,
"type": "SendMessage",
"x": 760,
"y": 330,
"data": {
"content": "You currently have {points} points."
}
}
],
"connections": [
{
"from": { "nodeId": 1, "pinId": "exec" },
"to": { "nodeId": 2, "pinId": "exec" }
},
{
"from": { "nodeId": 3, "pinId": "exec" },
"to": { "nodeId": 4, "pinId": "exec" }
},
{
"from": { "nodeId": 2, "pinId": "database" },
"to": { "nodeId": 4, "pinId": "database" }
},
{
"from": { "nodeId": 2, "pinId": "database" },
"to": { "nodeId": 6, "pinId": "database" }
},
{
"from": { "nodeId": 4, "pinId": "exec" },
"to": { "nodeId": 5, "pinId": "exec" }
},
{
"from": { "nodeId": 5, "pinId": "true" },
"to": { "nodeId": 6, "pinId": "exec" }
},
{
"from": { "nodeId": 6, "pinId": "exec" },
"to": { "nodeId": 7, "pinId": "exec" }
},
{
"from": { "nodeId": 5, "pinId": "false" },
"to": { "nodeId": 8, "pinId": "exec" }
}
]
}Tip: the Branch above checks if points is empty and initializes it to 0.
11. Testing checklist
- Confirm your mod folder has
mod.json,installed.json, andContents/*.json - Confirm
installed.jsonincludes your server ID - Restart the bot after major blueprint changes
- Check console for
[JSON Mods] Failed to execute ...errors - Verify your trigger text exactly matches your node settings
12. Common mistakes
- Reusing the same node ID twice
- Typo in pin names (
exec/true/false/value) - Forgetting to connect
databaseto read/write nodes - Using a guild ID that does not exist in
installed.json - Assuming role add/remove works without proper bot permissions
If your flow does not fire, simplify to a tiny chain first:
WhenUser -> SendMessage.
Then add one node at a time.