"I just wanna love you, wanna be loved~"
A feature-rich Discord bot written in Go with SQLite storage, named after everyone's favorite blood-obsessed villain! She's cute, she's crazy, and she'll manage your server with deadly efficiency~ π
"Let me help you... I promise I won't bite~ Much."
- Moderation: Kick, ban, unban, softban, hackban
- Timeout: Timeout and remove timeout
- Messages: Purge messages (with filters)
- Channel Control: Slowmode, lock/unlock channels
- Warning System: Track troublemakers~
- View Bans: See who's been naughty
- Track Activity: Users earn XP by chatting
- Leaderboards: See who's the most active!
- Level Roles: Auto-assign roles at level milestones
- Voice XP: Earn XP in voice channels too~
- Admin Controls: Set levels, add XP, mass XP operations
- Regex Filters: Custom pattern matching with actions (delete/warn/ban)
- Test Filters: Test patterns before enabling
- Per-Channel Config: Disable logging for specific channels
- Spam Filter: Limit mentions, links, and emojis with configurable actions
- Raid Detection: Automatic detection of mass joins
- Auto-Silence Modes: Log, alert, raid-only, or all-joins silencing
- Server Lockdown: Automatic verification level raise during raids
- Silence/Unsilence: Manual and timed user silencing
- Ban Raid: Bulk ban detected raid users
- Account Age Alerts: Flag new accounts joining
- Pressure-Based Detection: Accumulates spam pressure per user
- Configurable Penalties: Images, links, pings, length, repeats
- Decay System: Pressure naturally decreases over time
- Actions: Delete, warn, silence, kick, or ban spammers
- Track Mod Actions: Import and track bans, kicks, timeouts
- Mod Stats: See which moderators are most active
- User History: View moderation history for specific users
- Channel Cleaning: Automatically clean channels on schedule
- Warning Messages: Warn users before cleaning
- Preserve Options: Keep images if desired
- Message Logs: Deleted/edited messages
- Voice Logs: Join/leave events
- User Changes: Nicknames, avatars
- Configurable: Enable/disable each log type
- 8-ball, dice rolls, coinflip
- Rock Paper Scissors
- Random number generator
- Jokes, rate things, ship compatibility
- IQ/gay/PP tests (joke commands)
- Social interactions (hug, slap, pat, kiss)
- Would you rather, truth or dare
- Choose between options
- ASCII art, Zalgo text
- Reverse, upside down
- Morse code, Vaporwave
- OwO, mock text, Leet speak (1337)
- Regional indicators (emoji letters)
- Spoiler each character
- Encode/decode (base64, hex, binary, rot13)
- Codeblock wrapper, Hyperlink creator
- Random animal images (cat, dog, fox, bird, bunny, duck, koala, panda)
- User avatar and banner
- Server icon
- Cat and dog facts
- Random memes from Reddit
- Ping (latency check)
- Snipe deleted messages
- AFK status, Reminders
- Scheduled messages, Polls
- Custom embeds
- Clean your messages
- First message in channel
- Bot uptime, Say command
- Steal emoji, Simple math
- User/Server/Channel/Role info
- Emoji info, Bot info
- Invite info, Role list
- Member count
- Weather, Urban Dictionary
- Wikipedia, IP address lookup
- Cryptocurrency prices
- Minecraft server status
- GitHub users, NPM packages
- Color information
- Advice, quotes, facts
- Trivia questions
- Would you rather
- Truth or dare
- Never have I ever
- Dad jokes
- Password generator
- URL shortener (TinyURL)
- QR code generator
- Discord timestamp generator
- Character counter
- Snowflake decoder
- Server list (bot owner)
- Permission viewer
- Raw message content
- Message link generator
- Ban Export/Import - Share ban lists between servers!
- URL Playback: Play from YouTube, SoundCloud, and more via yt-dlp
- Local Library: Play files from configured music folders
- Queue Management: Add, remove, move tracks in queue
- Playback Controls: Play, pause, resume, skip, stop
- Volume Control: Adjust playback volume (0-100)
- DJ/Mod Roles: Permission system for music commands
- History: Track recently played songs
- Search: Search local music library
- Submit Tickets: Users can report issues to staff
- Configurable Channel: Set where tickets are forwarded
- Clean Interface: User messages are ephemeral, staff sees formatted embed
- Custom Triggers: Set responses when bot is mentioned with keywords
- Image Support: Include images in responses
- Welcome DMs: Send customizable DMs to new members
- Embed Support: Include title and message with placeholders
- Custom prefix
- Mod log channel
- Welcome messages
- View server settings
- Ask AI questions (requires OpenAI API key or compatible endpoint)
- Update Checking: Automatically checks for new versions on startup
- Periodic Checks: Configurable interval for background update checks (default: 24 hours)
- Channel Notifications: Optionally post update notifications to a channel
- Manual Updates: Use
/update checkto check for updates - Easy Apply: Use
/update applyto download and install updates - Auto-Relaunch: Bot automatically restarts with new version after update
- Config Preservation: Updates keep your config.json intact (max 3 backups)
- Source-Based Updates: Build from source instead of downloading binaries (perfect for BSD!)
- Configurable: Enable/disable auto-update, auto-apply, check interval, and notification channel
- Server Management: Visual dashboard to manage servers and settings
- Stats Overview: View bot statistics, server counts, member counts
- Guild Settings: Configure prefix, welcome messages, and more per-server
- Toggle Control: Enable/disable via
/webserver onand/webserver off - NGINX Ready: Designed to work behind NGINX reverse proxy
- Local by Default: Binds to 127.0.0.1 for security, configurable for remote access
- Real-Time Dashboard: View live metrics with auto-updating values
- Memory Monitoring: Track Alloc, Sys memory, and GC runs
- Discord Stats: Guilds, members, channels, heartbeat latency
- Activity Metrics: Commands processed, messages seen, rates per minute
- Interactive Charts: Memory and activity graphs (last hour)
- Database Stats: File size and table row counts
- SSE Updates: Server-Sent Events for instant 5-second updates
- Uptime Counter: Live uptime display
- Discord Command:
botstatsfor quick stats in Discord (Owner only)
- Full Stack Traces: Enable verbose logging with complete stack traces
- Error Details: Get detailed error information for troubleshooting
- Memory Stats: View memory and goroutine statistics
- Caller Info: Track exactly where errors originate
- AES-256-GCM: Industry-standard authenticated encryption for sensitive data
- Automatic Migration: Seamlessly encrypts existing data when enabled
- Selective Encryption: Only encrypts sensitive fields (messages, reasons, etc.)
- Backwards Compatible: Works with legacy unencrypted data
- Bot-level bans for users/servers
- DM forwarding to designated channels
"Let me help you get started~"
git clone https://github.com/blubskye/himiko.git
cd himikoCopy config.example.json to config.json and fill in your details:
{
"token": "YOUR_BOT_TOKEN_HERE",
"prefix": "/",
"database_path": "himiko.db",
"owner_id": "YOUR_DISCORD_USER_ID",
"owner_ids": ["YOUR_DISCORD_USER_ID", "OPTIONAL_SECOND_OWNER_ID"],
"apis": {
"weather_api_key": "",
"google_api_key": "",
"spotify_client_id": "",
"spotify_client_secret": "",
"openai_api_key": "",
"openai_base_url": "https://api.openai.com/v1",
"openai_model": "gpt-3.5-turbo",
"youtube_api_key": "",
"soundcloud_auth_token": ""
},
"features": {
"dm_logging": false,
"command_history": true,
"delete_timer": 0,
"webhook_notify": false,
"webhook_url": "",
"auto_update": true,
"auto_update_apply": false,
"update_check_hours": 24,
"update_notify_channel": "",
"update_from_source": false,
"debug_mode": false
},
"webserver": {
"enabled": false,
"port": 8080,
"host": "127.0.0.1",
"secret_key": "",
"allow_remote": false
},
"encryption": {
"enabled": false,
"key": ""
}
}go build ./cmd/himiko
./himiko"I'll always be here when you wake up... waiting for you~" π
The scripts/ directory contains helper scripts to run Himiko in the background with the ability to check on her output.
# Wake Himiko up in a tmux session~
./scripts/himiko-tmux.sh start
# Connect to Himiko's terminal
./scripts/himiko-tmux.sh attach
# Check if Himiko is running
./scripts/himiko-tmux.sh status
# Let Himiko rest...
./scripts/himiko-tmux.sh stopπ‘ To detach from tmux without stopping Himiko: Press
Ctrl+B, thenD
"I'll start automatically... because I just wanna be with you~"
-
Edit the service file to match your setup:
nano scripts/himiko-bot.service
Change
YOUR_USERto your username and/path/to/himikoto the actual path. -
Install and enable:
sudo cp scripts/himiko-bot.service /etc/systemd/system/ sudo systemctl daemon-reload sudo systemctl enable himiko-bot sudo systemctl start himiko-bot -
Attach to Himiko's terminal:
tmux attach -t himiko-bot
-
Check on Himiko:
sudo systemctl status himiko-bot
"Even on BSD... I'll find a way to be with you~"
-
Install the rc script:
sudo cp scripts/himiko-bot-freebsd /usr/local/etc/rc.d/himiko_bot sudo chmod +x /usr/local/etc/rc.d/himiko_bot
-
Configure in
/etc/rc.conf:sudo sysrc himiko_bot_enable=YES sudo sysrc himiko_bot_user="YOUR_USER" sudo sysrc himiko_bot_dir="/path/to/himiko"
-
Start Himiko:
sudo service himiko_bot start
-
Attach to Himiko's terminal:
su - YOUR_USER -c "tmux attach -t himiko-bot"
"I'll run on Windows too... nothing can keep us apart~"
scripts\himiko-start.bat# Start Himiko in the background
.\scripts\himiko-service.ps1 start
# Check status
.\scripts\himiko-service.ps1 status
# View output (Ctrl+C to detach)
.\scripts\himiko-service.ps1 attach
# Stop Himiko
.\scripts\himiko-service.ps1 stop
# Add to Windows startup (runs on login)
.\scripts\himiko-service.ps1 install
# Remove from startup
.\scripts\himiko-service.ps1 uninstallHidden Startup (No Console Window)
Double-click scripts\himiko-hidden.vbs to start Himiko without a console window.
To add to startup manually:
- Press
Win+R, typeshell:startup, press Enter - Create a shortcut to
himiko-hidden.vbsin that folder
- Go to the Discord Developer Portal
- Create a new application (name it Himiko, of course~)
- Go to the "Bot" section
- Click "Add Bot"
- Copy the token
- Enable all Privileged Gateway Intents:
- Presence Intent
- Server Members Intent
- Message Content Intent
Use the /invite command once she's running, or construct the URL:
https://discord.com/api/oauth2/authorize?client_id=YOUR_CLIENT_ID&permissions=8&scope=bot%20applications.commands
"I'll keep your secrets safe... because I love you~" π
Himiko supports optional field-level encryption for sensitive database fields. This protects data like:
- Welcome messages and join DM content
- Warning reasons
- Deleted message content (snipe)
- AFK messages, reminders, scheduled messages
- Custom command responses and tags
- Mod action reasons
- Bot ban reasons
- Mention responses
- Add an encryption key to your
config.json:
{
"encryption": {
"enabled": true,
"key": "your-strong-passphrase-here"
}
}- Restart Himiko. On first startup with encryption enabled, she'll automatically migrate existing data.
Important Notes:
- Use a strong passphrase (at least 16 characters recommended)
- Back up your database before enabling encryption
- Keep your key safe - if lost, encrypted data cannot be recovered
- The key is used to derive an AES-256 encryption key via PBKDF2
- AES-256-GCM: Industry-standard authenticated encryption
- PBKDF2 Key Derivation: 100,000 iterations for key stretching
- Automatic Migration: Existing data is encrypted on first startup
- Backwards Compatible: Can read legacy unencrypted data seamlessly
- Selective: Only sensitive text fields are encrypted, not IDs or metadata
If you prefer whole-database encryption, you can store your himiko.db on a VeraCrypt encrypted volume:
- Create a VeraCrypt encrypted container
- Mount it before starting Himiko
- Set
database_pathto point to the mounted volume (e.g.,/mnt/encrypted/himiko.db) - Unmount when not in use
This provides full-disk encryption but requires manual mounting.
"I'll build myself just for you~" π
For systems where pre-compiled binaries aren't available (like FreeBSD, OpenBSD, or custom architectures), Himiko supports building updates from source automatically.
- BSD Compatibility: Pre-compiled Linux binaries won't work on BSD systems
- Custom Builds: Build with your own compiler flags or optimizations
- No VM Required: No need to run a VM just to cross-compile binaries
- Always Fresh: Build directly from the latest git repository
-
Clone the repository (if you haven't already):
git clone https://github.com/blubskye/himiko.git cd himiko -
Enable in config.json:
{ "features": { "update_from_source": true } } -
Build and run:
go build ./cmd/himiko ./himiko
When update_from_source is enabled:
- Check for updates:
git fetchto check for new commits - Apply updates:
git pullfollowed bygo build - Replace binary: Swaps out the old binary with the newly built one
- Relaunch: Automatically restarts the bot with the new version
# Check for source updates
/update check
# Pull and rebuild from source
/update apply
# View current version and update method
/update version- Git must be installed
- Go 1.21+ must be installed
- Must be running from a cloned git repository
- GCC required (for go-sqlite3 compilation)
- Local changes are automatically stashed before updating
- The update preserves your
config.jsonand database - If the build fails, the old binary is restored automatically
- Works great with FreeBSD, OpenBSD, NetBSD, and other Unix-like systems
- Go 1.21+
- GCC (for SQLite compilation with go-sqlite3)
- FFmpeg (for music playback)
- yt-dlp (for YouTube/SoundCloud support)
| Category | Commands |
|---|---|
| Admin | kick, ban, unban, softban, hackban, timeout, untimeout, purge, slowmode, lock, unlock, warn, warnings, clearwarnings, bans |
| XP | xp, rank, leaderboard, setlevel, setxp, addxp, massaddxp |
| Ranks | addrank, removerank, listranks, syncranks, applyranks |
| Voice XP | voicexp (enable/disable/rate/interval/ignoreafk/status) |
| Filters | addfilter, removefilter, listfilters, testfilter |
| AutoClean | autoclean (add/remove/list), setcleanmessage, setcleanimage |
| Logging | setlogchannel, togglelogging, logconfig, disablechannellog, enablechannellog, logstatus |
| Fun | 8ball, dice, coinflip, rps, random, joke, rate, ship, iq, gayrate, pp, hug, slap, pat, kiss, wyr, tod, choose |
| Text | ascii, zalgo, reverse, upsidedown, morse, vaporwave, owo, mock, leet, regional, spoilertext, encode, decode, codeblock, hyperlink |
| Images | cat, dog, fox, bird, bunny, duck, koala, panda, avatar, banner, servericon, catfact, dogfact, meme |
| Utility | ping, snipe, afk, remind, schedule, poll, embed, clean, firstmessage, uptime, say, stealemoji, math |
| Info | userinfo, serverinfo, channelinfo, roleinfo, emojiinfo, botinfo, stats, inviteinfo, rolelist, membercount |
| Lookup | weather, urban, wiki, ip, crypto, minecraft, github, npm, color |
| Random | advice, quote, fact, trivia, wyr, tod, nhie, dadjoke, password |
| Tools | tinyurl, qrcode, timestamp, charcount, snowflake, servers, permissions, raw, messagelink |
| BanExport | exportbans, importbans, scanbans |
| ModStats | modstats, importmodhistory, modhistory |
| SpamFilter | spamfilter (status/enable/disable/set) |
| Anti-Raid | antiraid (status/enable/disable/set/setrole/setalert/autosilence), silence, unsilence, getraid, banraid, lockdown |
| Anti-Spam | antispam (status/enable/disable/set/penalties/setrole) |
| Mentions | mention (add/remove/list) |
| Ticket | ticket, setticket, disableticket, ticketstatus |
| Settings | setprefix, setmodlog, setwelcome, disablewelcome, setjoindm, disablejoindm, settings |
| DM | setdmchannel, disabledm, dmstatus |
| BotBan | botban, botunban, botbanlist |
| AI | ask |
| Music | play, skip, stop, pause, resume, queue, nowplaying, remove, clear, movetop, volume, join, leave, musicrole, folders, files, local, search, musicfolder, musichistory |
| Update | update (check/apply/version) |
| WebServer | webserver (on/off/status/config), botstats |
| Misc | help, command, tag, notify, history, about, invite, source |
This bot is licensed under AGPL-3.0. You can view the source code using the /source command or visiting:
https://github.com/blubskye/himiko
"I'll always be transparent with you~ That's true love, right?"
This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0) π
"I want to share everything with you... let's be open with each other~"
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 find 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 true love, right?"
This ensures that improvements to the bot benefit the entire community, not just one person.
Himiko Discord Bot
Copyright (C) 2025 Himiko Contributors
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
See the LICENSE file for the full legal text.
Source Code: https://github.com/blubskye/himiko
Made with π and obsessive love
