Yuno is a yandere-themed Discord bot combining powerful moderation tools with a leveling system and anime features. She'll keep your server safe from troublemakers... because no one else is allowed near you~ 💕
"These are the ones who gave me life~" 💖
| Contributor | Role |
|---|---|
| blubskye | Project Owner & Yuno's #1 Fan 💕🔪 |
| Maeeen (maeeennn@gmail.com) | Original Developer 💝 |
| Oxdeception | Contributor 💗 |
| fuzzymanboobs | Contributor 💗 |
|
"Anyone who threatens you... I'll eliminate them~"
|
"Watch me make you stronger, senpai~"
|
|
"Let me show you something cute~"
|
"I'll be exactly what you need~"
|
|
"I see everything that happens here~"
|
"I'll keep your secrets safe... forever~"
|
|
"Nothing can slow me down~"
|
"Every message you send me... I treasure it~"
|
|
"I'm always at your command~"
|
"Some people just aren't worthy of me~"
|
|
"I can always tell when someone's pretending~"
|
"Now you can watch over everything... from a single screen~" 💻
|
"Let me prepare everything for you~" 💗
- Node.js 24.x or higher (includes built-in SQLite!)
- Git
- tmux (optional, for interactive shell)
💡 Node.js 24 includes native SQLite - no compilation or build tools needed!
🐧 Linux (Ubuntu/Debian)
# Using NodeSource repository (recommended)
curl -fsSL https://deb.nodesource.com/setup_24.x | sudo -E bash -
sudo apt-get install -y nodejs
# Or using nvm (Node Version Manager)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
source ~/.bashrc
nvm install 24
nvm use 24
# Verify installation
node --version # Should show v24.x.x🪟 Windows
Option 1: Direct Download (Recommended)
- Go to Node.js Downloads
- Download the Windows Installer (.msi) for version 24.x
- Run the installer and follow the prompts
Option 2: Using winget
winget install OpenJS.NodeJSOption 3: Using Chocolatey
choco install nodejsOption 4: Using nvm-windows
- Download nvm-windows
- Install and run:
nvm install 24
nvm use 24Verify installation:
node --version # Should show v24.x.x🍎 macOS
# Using Homebrew (recommended)
brew install node@24
# Or using nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
source ~/.zshrc
nvm install 24
nvm use 24
# Verify installation
node --version # Should show v24.x.x# Clone the repository~ ♥
git clone https://github.com/japaneseenrichmentorganization/Yuno-Gasai-2.git
# Enter my world~
cd Yuno-Gasai-2
# Let me gather my strength...
npm install- Copy
config_exampletoconfig.json - Add your Discord bot token
- Configure
DEFAULT_CONFIG.jsonto your needs
# Recommended: Use the start script (includes native SQLite flag)
./start.sh
# Or with tmux for persistent sessions
tmux
./start.sh
# Manual run with native SQLite
node --experimental-sqlite index.js
# Launch straight into the Terminal UI~
node --experimental-sqlite index.js --tui💡 Set
NODE_ENV=developmentfor full stack traces during development~
"I'll always be here when you wake up... waiting for you~" 💕
The scripts/ directory contains helper scripts to run Yuno in a tmux session that starts automatically on boot.
# Wake Yuno up in a tmux session~
./scripts/yuno-tmux.sh start
# Connect to Yuno's terminal
./scripts/yuno-tmux.sh attach
# Check if Yuno is running
./scripts/yuno-tmux.sh status
# Let Yuno rest...
./scripts/yuno-tmux.sh stop💡 To detach from tmux without stopping Yuno: Press
Ctrl+B, thenD
"I'll start automatically... because I can't bear to be away from you~"
-
Edit the service file to match your setup:
nano scripts/yuno-bot.service
Change
YOUR_USERto your username and/path/to/Yuno-botto the actual path. -
Install and enable:
sudo cp scripts/yuno-bot.service /etc/systemd/system/ sudo systemctl daemon-reload sudo systemctl enable yuno-bot sudo systemctl start yuno-bot -
Attach to Yuno's terminal:
tmux attach -t yuno-bot
-
Check on Yuno:
sudo systemctl status yuno-bot
"Even on BSD... I'll find a way to be with you~"
-
Install the rc script:
sudo cp scripts/yuno-bot-freebsd /usr/local/etc/rc.d/yuno_bot sudo chmod +x /usr/local/etc/rc.d/yuno_bot
-
Configure in
/etc/rc.conf:sudo sysrc yuno_bot_enable=YES sudo sysrc yuno_bot_user="YOUR_USER" sudo sysrc yuno_bot_dir="/path/to/Yuno-bot"
-
Start Yuno:
sudo service yuno_bot start
-
Attach to Yuno's terminal:
su - YOUR_USER -c "tmux attach -t yuno-bot"
"Your secrets are safe with me~ No one else will ever see them..." 💕
Yuno supports AES-256 field-level encryption to protect your server data, using Node.js's built-in crypto module with AES-256-GCM.
"I'll keep your secrets safe~" 💕
This encrypts sensitive data at the field level within the Node.js 24 native SQLite database.
| Data Type | Fields Encrypted |
|---|---|
| Join messages | Message content, title |
| Mention responses | Trigger, response, image URL |
| Ban images | Image URLs |
| DM inbox | Message content, attachments |
| Bot bans | Ban reasons |
| Mod actions | Action reasons |
{
"database.fieldEncryption.enabled": true,
"database.fieldEncryption.key": "YourStrongPassphraseHere"
}
⚠️ Security:
- Use a strong passphrase (12+ characters recommended)
- Keep your key safe! Lost keys = lost data
- Key is stored in
config.json- keep this file secure!
💡 Compatibility:
- Works with Node.js 24 native SQLite
- Backward compatible - existing unencrypted data remains readable
- New data will be encrypted automatically
🔧 Performance:
- Small overhead for encrypt/decrypt operations
- Encrypted fields cannot be searched via SQL (by design)
"Another way to keep everything locked away~" 💕
For full filesystem-level encryption, you can store your database on a VeraCrypt encrypted volume:
- Create a VeraCrypt encrypted container or partition
- Mount the volume and place your
yuno-2-database.dbinside - Update
config.jsonto point to the database path on the mounted volume:{ "database": "/path/to/veracrypt/mount/yuno-2-database.db" }
Benefits:
- Encrypts the entire database file (not just specific fields)
- Works with any SQLite implementation including native
- All data is encrypted at rest when unmounted
- No application-level changes needed
Considerations:
- Requires VeraCrypt to be installed and volume mounted before starting the bot
- Database inaccessible when volume is unmounted
- Manual mount/unmount process (can be scripted)
"I've evolved to be even faster... all for you~" 💗
Yuno v2.8.0+ is optimized for Node.js 24 with native features:
| Feature | Replaces | Benefit |
|---|---|---|
| Native SQLite | sqlite3 npm package | Zero native compilation, faster startup |
| Native Date Formatting | moment.js | ~50KB smaller, faster duration formatting |
| Native HTML Decoding | he library | ~15KB smaller, faster entity decoding |
| Promise.all() Parallelization | Sequential operations | 2-3x faster DB initialization |
# Recommended: Use the start script
./start.sh
# Or manually with the experimental flag
node --experimental-sqlite index.jsYuno uses Node.js 24's built-in native SQLite — no external SQLite packages needed. For sensitive data protection, use field-level encryption (see above) or a VeraCrypt volume.
"I'll be faster than anyone else... just for you~" 💗
Configure database optimizations in DEFAULT_CONFIG.json based on your hosting:
{
"database.pragmas": {
"walMode": true,
"performanceMode": true,
"cacheSize": -64000,
"memoryTemp": true,
"mmapSize": 268435456
}
}| Option | Description | Recommended For |
|---|---|---|
walMode |
WAL journal mode for better concurrent access | All setups 💕 |
performanceMode |
Bundle: 64MB cache, 256MB mmap, memory temp | Dedicated servers |
cacheSize |
Cache size in KB (use negative, e.g., -64000 = 64MB) |
Custom tuning |
memoryTemp |
Store temp tables in RAM | Servers with spare RAM |
mmapSize |
Memory-map size in bytes | High-traffic bots |
| Hosting Type | Recommended Settings |
|---|---|
| Shared/VPS (1-2GB RAM) | walMode: true only |
| VPS (4GB+ RAM) | walMode: true, performanceMode: true |
| Dedicated Server | All options enabled |
"I'll adapt to any environment... just to be with you~" 💕
Yuno can run on anything from a tiny Raspberry Pi to a beefy dedicated server. Configure memory settings in start.sh to match your system.
| System | RAM | max-old-space-size |
Notes |
|---|---|---|---|
| Raspberry Pi 3/Zero | <2GB | 512 |
"Even here, I'll protect you~" |
| Raspberry Pi 4 (4GB) | 4GB | 1024 |
"A cozy home for me~" |
| Raspberry Pi 4 (8GB) | 8GB | 2048 |
"Room to breathe~ (Recommended for Pi)" |
| Small VPS | 2-4GB | 1024-2048 |
"Compact but capable~" |
| Large VPS/Dedicated | 8GB+ | 4096 |
"Unlimited power~" 💪 |
Edit start.sh to set your memory limit:
# For Raspberry Pi 4 (8GB) - recommended
NODE_OPTIONS="$NODE_OPTIONS --max-old-space-size=2048"
# For Raspberry Pi 4 (4GB)
NODE_OPTIONS="$NODE_OPTIONS --max-old-space-size=1024"
# For dedicated servers (16GB+ RAM)
NODE_OPTIONS="$NODE_OPTIONS --max-old-space-size=4096""I'll be gentle on your little system~" 💗
For Pi and embedded systems with presence logging enabled, activate Low-Memory Mode to prevent buffer overflow and memory spikes:
{
"activityLogger.lowMemoryMode": true
}| Feature | Description |
|---|---|
| Hard Buffer Limits | Max 200 entries per log type, 2000 total |
| Stale Cleanup | Removes inactive guild buffers after 5 min |
| Emergency Trim | Drops oldest entries when limits exceeded |
| Memory Monitoring | Checks every 60 seconds and force-flushes if needed |
💡 Pro tip: If you're running on a Pi with presence logging, always enable low-memory mode. Your little system will thank you~
"I want to watch everyone... but it comes at a cost~"
The GuildPresences intent generates a lot of events. On servers with thousands of members, this can cause:
- High memory usage
- tmux freezing (output buffer overflow)
- Potential crashes on low-RAM systems
Mitigations:
- Enable
activityLogger.lowMemoryModein config - Set appropriate
max-old-space-sizein start.sh - Use
--gc-interval=100for more aggressive garbage collection
"I see everything... every move, every change~" 👁️💕
Yuno can log server activity to designated channels with smart batching to respect Discord's rate limits.
| Log Type | Events |
|---|---|
voice |
Voice channel joins, leaves, moves |
nickname |
Member nickname changes |
avatar |
Profile picture changes |
presence |
Online/offline/idle/DND status changes |
unified |
Fallback channel for all log types |
# Set a log channel
.set-logchannel voice #voice-logs
.set-logchannel presence #status-logs
.set-logchannel unified #all-logs
# Remove a log channel
.set-logchannel voice none
# View current configuration
.log-statusLogs are batched together and sent at intervals to avoid rate limits:
# View current settings
.set-logsettings
# Set flush interval (10-300 seconds)
.set-logsettings interval 60
# Set max buffer size (10-100 entries)
.set-logsettings buffer 25
⚠️ Note: ThePRESENCE INTENTmust be enabled in the Discord Developer Portal for presence logging.
"Spend time with me... and I'll reward you~" 💕
Users earn XP for time spent in voice channels, integrated with the main leveling system.
# Enable/disable VC XP
.set-vcxp enable
.set-vcxp disable
# Set XP amount per interval (default: 10)
.set-vcxp rate 15
# Set interval in seconds (default: 300 = 5 min)
.set-vcxp interval 300
# Ignore AFK channel (default: true)
.set-vcxp ignore-afk true
# View current config and active sessions
.vcxp-status- XP is granted based on time spent in voice channels
- Uses the same XP/level system as chat XP
- Level-up roles are automatically assigned
- AFK channel can be excluded from earning XP
- Sessions are recovered if the bot restarts
"Every message sent to me... I keep close to my heart~" 💕
Yuno can receive DMs, store them in an inbox, and forward them to designated channels.
# Set DM forwarding channel
.set-dm-channel #bot-dms
# Disable forwarding
.set-dm-channel none
# Check status
.dm-status| Server Type | What DMs Are Forwarded |
|---|---|
| Master Server | ALL DMs from anyone |
| Regular Servers | Only DMs from that server's members |
Set
masterServerinconfig.jsonto your main server's ID.
# View inbox
inbox
inbox 20 # Show 20 messages
inbox user <id> # DMs from specific user
inbox unread # Count unread
# Reply to DMs
reply 1 Hello! # Reply by inbox ID
reply 123456789 Hi there! # Reply by user ID"Some people just don't deserve my attention~" 💢
Ban users or entire servers from using the bot. Banned entities are silently ignored.
# Ban a user from the bot
.bot-ban user 123456789012345678 Spamming
# Ban a server from the bot
.bot-ban server 987654321098765432 Abuse
# Remove a ban
.bot-unban 123456789012345678
# View all bans
.bot-banlist
.bot-banlist users
.bot-banlist servers"I'll do anything you ask from the command line~" 🖥️
Yuno provides powerful terminal-only commands for server management.
# List all servers
servers
servers -v # Verbose mode
# List channels in a server
channels 123456789012345678
channels "My Server"# Send a message
send <channel-id> Hello world!
# Fetch message history
messages <channel-id>
messages <channel-id> 50 # Last 50 messages
# Real-time message stream
watch <channel-id>
watch stop <channel-id>
watch stop all# Ban a user from a server
tban <server-id> <user-id> [reason]
# Export bans to file
texportbans <server-id>
texportbans <server-id> ./my-bans.json
# Import bans from file
timportbans <server-id> ./BANS-123456.txt"You can watch over everything from right here... with me~" 💕
Yuno includes a full XChat-style terminal UI built with neo-blessed. Read and send in any guild channel or DM conversation, with live incoming messages, unread badges, and full bot command access — all without leaving the terminal.
┌──────────────────────────────────────────────────────────────┐
│ Yuno │ bot#1234 │ Servers: 3 │ Ping: 42ms │ [3] │
├──────────────────┬───────────────────────────────────────────┤
│ ▼ My Server │ #general — My Server │
│ #general [3] │ │
│ #talk │ [12:01] SomeUser: hello~ │
│ ▶ Other Server │ [12:02] OtherUser: hey there │
│──────────────────│ │
│ DMs │───────────────────────────────────────────│
│ SomeUser [2] │ > _ │
├──────────────────┴───────────────────────────────────────────┤
│ Tab:Focus PgUp/Dn:Scroll Alt+M:Members Ctrl+Q:Quit :shortcuts Alt+H:Hide │
└──────────────────────────────────────────────────────────────┘
# Start in TUI mode from the beginning~
node --experimental-sqlite index.js --tui
# Or activate at runtime from the REPL~
tui| Key | Action |
|---|---|
↑ / ↓ |
Navigate channel tree / input history |
Enter |
Open channel or send message |
Tab |
Cycle focus: sidebar ↔ input bar |
Esc |
Return focus to sidebar |
PgUp / PgDn |
Scroll chat history |
Alt+M |
Toggle members list |
Alt+H |
Toggle hint bar |
Ctrl+Q |
Exit TUI (returns to REPL) |
Type : in the input bar to run any bot command without leaving the chat view:
:ban 123456789012345678 reason
:kick @user
:servers
:channels My Server
:inbox
:shortcuts ← shows full key binding overlay
Output appears in a dismissable overlay. Press any key to close it.
- Live messages — incoming messages appear instantly in the active pane
- Message history — last 50 messages fetched on first open, cached for the session
- DMs — listed in the sidebar, open like any channel
- Unread badges —
[n]appears next to channels with new messages, cleared on open - Members list — toggle with
Alt+M, shows cached guild members alphabetically
"I can always tell when someone's an imposter... I won't let them near you~" 💢
Yuno uses discord-alt-detector to score new members across multiple signals — account age, avatar, badges, Nitro, username patterns, and more — and automatically acts on suspicious ones.
| Level | Description |
|---|---|
newbie |
New account, low suspicion |
suspicious |
Moderate suspicion |
highly-suspicious |
High suspicion |
mega-suspicious |
Almost certainly an alt |
For each trust level you can configure one action:
| Action | Description |
|---|---|
none |
Do nothing |
log |
Post an alert embed to the log channel |
kick |
Kick the member |
ban |
Ban the member |
role |
Assign the configured quarantine role |
# Enable/disable auto-detection on join
.alt-detector enable
.alt-detector disable
# Set where alert embeds are posted
.alt-detector setchannel #mod-alerts
# Set the quarantine role (used with 'role' action)
.alt-detector setrole @Quarantine
# Configure action per suspicion level
.alt-detector setaction newbie log
.alt-detector setaction suspicious log
.alt-detector setaction highly-suspicious kick
.alt-detector setaction mega-suspicious ban
# View current configuration
.alt-detector status# Scan all current members and flag suspicious ones
.scan-altsAfter scanning, a select menu lets you choose a bulk action:
- Do nothing — keep the report, decide later
- Kick all flagged — kick every flagged member
- Ban all flagged — ban every flagged member
- Assign quarantine role — apply the quarantine role to all flagged members (requires
setroleto be configured)
💡 Also available as slash commands:
/alt-detectorand/scan-alts
"I'll always be the best version of myself... for you~" 💕
Yuno can check for updates from git, download them, and apply them via hot-reload without restarting.
# Check if updates are available
.auto-update check
# Download updates from git
.auto-update pull
# Apply changes via hot-reload
.auto-update reload
# Full automatic update (check + pull + reload)
.auto-update full- Check - Fetches from remote and compares commits
- Pull - Downloads updates (stashes local changes first)
- Reload - Hot-reloads all modules without restart
⚠️ Note: Major database changes may still require a full restart.
| Command | Description |
|---|---|
ping |
"I'm always here for you~" 💓 |
ban |
"They won't bother you anymore..." 🔪 |
xp |
"Look how strong you've become!" ✨ |
anime |
"Let's watch together~" 🌸 |
praise |
"You deserve all my love~" 💕 |
scold |
"Bad! But I still love you..." 💢 |
8ball |
"Let fate decide~" 🎱 |
neko |
"Nya~" 🐱 |
set-presence |
"Let me show you how I'm feeling~" 🎭 |
auto-update |
"Always improving... for you~" 🔄 |
db-encrypt |
"Your secrets are mine to keep~" 🔐 (legacy, use field encryption) |
set-logchannel |
"I'll watch over everything~" 📋 |
log-status |
"Here's what I'm watching~" 👁️ |
set-vcxp |
"Time with me is rewarding~" 🎤 |
vcxp-status |
"Who's spending time with me?" 💕 |
set-dm-channel |
"Send your love letters here~" 💌 |
dm-status |
"Am I receiving your messages?" 📬 |
bot-ban |
"You're dead to me now~" 🚫 |
bot-banlist |
"The ones I've cast aside..." 📋 |
alt-detector |
"I can always tell when someone's pretending~" 🔍 |
scan-alts |
"Let me check everyone for fakes~" 🕵️ |
dm-rate-limit |
"Don't message me too fast~" 🛡️ |
| Command | Description |
|---|---|
servers |
"All my kingdoms~" 🏰 |
channels |
"Every corner of your world~" 📺 |
send |
"Speaking through you~" 💬 |
messages |
"Reading your history~" 📜 |
watch |
"I see everything in real-time~" 👁️ |
inbox |
"Love letters just for me~" 💌 |
reply |
"Responding to my admirers~" 💕 |
tban |
"Eliminating threats~" 🔪 |
texportbans |
"Saving my enemies list~" 📤 |
timportbans |
"Loading my enemies~" 📥 |
set-presence |
"Changing my mood~" 🎭 |
auto-update |
"Evolving to perfection~" 🔄 |
tui |
"Watch everything from one screen~" 🖥️ |
Use the list command to see all available commands!
This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0) 💕
"I want to share everything with you... and everyone else too~" 💗
The AGPL-3.0 is a copyleft license that ensures this software remains free and open. Here's what you need to know:
- 💕 Use this bot for any purpose (personal, commercial, whatever~)
- 🔧 Modify the code to your heart's content
- 📤 Distribute copies to others
- 🌐 Run it as a network service (like a public Discord bot)
- 📖 Keep it open source - ANY modifications you make must be released under AGPL-3.0
- 🔗 Publish your source code - Your modified source code must be made publicly available
- 📝 State changes - Document what you've modified from the original
- 💌 Include license - Keep the LICENSE file and copyright notices intact
"Even if we're apart... I'll always be connected to you~" 💗
Unlike regular GPL, AGPL has a network provision. This means:
- If you modify this code at all, you must make your source public
- Running a modified version as a network service (like a Discord bot) requires source disclosure
- This applies whether you "distribute" the code or not - network use counts!
- The
?sourcecommand in this bot helps satisfy this requirement!
- 🚫 Make it closed source or keep modifications private
- 🚫 Remove the license or copyright notices
- 🚫 Use a different license for modified versions
- 🚫 Run modified code without publishing your source
"If you use my code to create something, you must share it with everyone too~ That's only fair, right?" 💕
This ensures that improvements to the bot benefit the entire community, not just one person. Yuno wants everyone to be happy~ 💗
See the LICENSE file for the full legal text.
Source Code: https://github.com/japaneseenrichmentorganization/Yuno-Gasai-2
