Discord Bot
Overview
Saba-chan includes a built-in Discord bot (discord.js 14) that lets you control game servers directly from Discord chat.
Setup
1. Create a Discord Bot
- Go to the Discord Developer Portal and create a new application.
- Navigate to the Bot section and copy the bot token.
2. Register the Token
- GUI: Settings → Discord Bot → enter token
- CLI:
:bot token <YOUR_TOKEN>
3. Invite the Bot
Generate an OAuth2 URL with message read/write permissions and invite the bot to your server.
4. Start the Bot
- GUI: Click the bot icon in the title bar
- CLI:
:bot start - Auto-start: Set
discordAutoStart: truein settings
Operating Modes
| Mode | Description | Requirement |
|---|---|---|
| Local | Logs into Discord directly, executes commands via local daemon IPC | Default mode |
| Cloud | Communicates through relay server; no direct Discord login needed | RELAY_URL + RELAY_NODE_TOKEN |
Cloud mode enables the Discord bot even behind NAT without port forwarding.
Commands
Command format:
<prefix> <module> <command> [args...]
Default prefix: 사바쨩
Built-in Commands
| Command | Description |
|---|---|
<prefix> or <prefix> help | Show help |
<prefix> list | List servers |
Module Commands
| Command | Description |
|---|---|
<prefix> <module> start | Start server |
<prefix> <module> stop | Stop server |
<prefix> <module> status | Check server status |
<prefix> <module> <cmd> [args] | Execute module command |
Examples:
사바쨩 palworld status
사바쨩 minecraft start
사바쨩 zomboid stop
Alias System
Simplify commands with aliases in bot-config.json:
{
"moduleAliases": {
"팔": "palworld",
"마크": "minecraft"
},
"commandAliases": {
"켜": "start",
"꺼": "stop"
}
}
Result:
사바쨩 팔 켜 → 사바쨩 palworld start
사바쨩 마크 꺼 → 사바쨩 minecraft stop
Alias changes are hot-reloaded — no bot restart required.
Per-Guild Settings
Use nodeSettings in bot-config.json to filter instances by Discord guild.
Bot Extensions
| Extension | Description |
|---|---|
| music.js | Music playback (local mode only, requires yt-dlp + ffmpeg) |
| easter_eggs.js | Easter eggs |
| rps.js | Rock-paper-scissors minigame |