Mood-aware Auto-DJ
A nine-dimensional fingerprint of every track feeds a per-session vibe centroid. When the queue empties, GoPal picks the next song instead of going silent.
GoPal is a Discord music bot with a mood-aware Auto-DJ. It fingerprints every track across nine audio features, then queues the next song to keep the energy exactly where your server left it.
Click a command to see exactly what GoPal posts in Discord. The player is simulated, but the embeds, queue math, and Auto-DJ logic mirror the real bot.
The player is simulated. Embeds and queue logic mirror the real bot.
Every module is designed around one question: what should play next, and why?
A nine-dimensional fingerprint of every track feeds a per-session vibe centroid. When the queue empties, GoPal picks the next song instead of going silent.
A rolling 15-track memory excludes recent plays and scores novelty, so the same song doesn't sneak back in.
Instant Crush
Daft Punk
Midnight City
M83
Let It Happen
Tame Impala
No repeats in the last 15
Every server gets its own queue, session state, and locks. One busy server can't stall another.
sync.RWMutex · per-guild map
Voice and streaming are delegated to a Lavalink node, keeping the Go process light and playback smooth.
38ms
p95 handshake
A per-artist cap stops one artist from flooding recommendations, even when similarity scores are high.
Diversity cap applied before ranking
Multi-stage Docker builds produce a tiny non-root image, deployed through GitHub Actions and a Cloudflare tunnel on every push.
Build
scratch image
Push
ghcr.io
Deploy
tunnel
GoPal is a portfolio-grade system: concurrent API fusion, bounded I/O, per-guild state, and a deploy pipeline that runs on every push.
One message, end to end
Discord Gateway
Message + voice events
DisGo event router
?play · ?skip · ?stop
Lavalink
Voice + streaming
Recommender
Rank + select
context timeouts · sync locks · token cache
// per-guild session memory
sess.state.Update(seed.Features, 0.25)
pool = filterPool(pool, sess.recent.IDs(), 3)
ranked := RankTracks(pool, sess.state, sess.recent.Features(), params)
next, err := selector.Select(ranked, sess.state)
if err != nil {
return ""
}
return fmt.Sprintf("%v - %v", next.TrackTitle, next.TrackArtist)
38ms
p95 Lavalink handshake
99.9%
deployment target
9D
audio features per track
15trk
rolling memory window
Metrics are illustrative portfolio targets.