Ask.AI Discord Bot
// discord bot - ai chat + music
Self-hosted Discord bot pairing DeepSeek AI chat with a full Lavalink music stack — AI-curated playlists, a live now-playing card, and music that survives restarts.
> overview
A self-hosted Discord bot that pairs an AI chat assistant with a production music system, running as a systemd service in an LXC container beside its Lavalink v4 node. Mention it and DeepSeek answers; ask it for a vibe and a search-grounded model (Perplexity Sonar) researches what a scene’s listeners actually play, writes a real tracklist, and the bot resolves every song through YouTube Music search. Playback runs on a live now-playing card — album art, progress bar, artist-labeled up-next list, button controls — and survives deploys: graceful shutdown announces the restart and snapshots the session, and the next boot rejoins and resumes mid-song if humans are still in the channel. Every request passes one input gate (rate limits, prompt caps, a role-based ban, sanitized errors), the bot stores no message content, and it cleans up after itself — its own messages expire after 24 hours, with an admin /purge for instant sweeps. 72 unit tests across the gate, music manager, janitor, and card rendering.
> features
- AI chat on mention — DeepSeek answers in-channel, with respectful-by-design prompting
- /vibe builds scene-authentic playlists: a search-grounded AI writes the tracklist, Lavalink resolves and streams it
- Natural-language music — 'play me a 90s playlist' works without slash commands
- Live now-playing card with album art, progress, artist-labeled queue, and button controls
- Music survives restarts: graceful shutdown snapshots the session, boot resumes mid-song if listeners are still there
- Input gate: per-user/server rate limits, prompt caps, sanitized errors, and a role-based ban
- Self-cleaning channels — messages expire after 24h, admins can /purge instantly