π§ Modern Discord music bot with typed architecture, polished music panels, playlist persistence, and production-ready Lavalink flow.
Nexa Music v2 is a TypeScript Discord music bot built on discord.js v14, riffy, and Lavalink v4. It focuses on clean interaction design, stronger runtime safety, and a more scalable codebase than the older JavaScript builds.
This release introduces a full TypeScript migration, Components V2 panel helpers, SQLite persistence through Drizzle ORM, hybrid slash/prefix command support, and better node and playback state handling.
| Area | Highlights |
|---|---|
| π¨ UI | Full Components V2 panel-based replies and richer playback messaging |
| π§ Type Safety | Full JS to TS migration with typed client, commands, events, and storage |
| π΅ Playback | Track control buttons, improved autoplay logic, pause/resume sync, and queue flow cleanup |
| πΎ Persistence | SQLite storage for playlists and guild 24/7 settings |
| π§© Commands | Recursive command loading and hybrid prefix/slash support |
| π Diagnostics | Improved node stats, health views, and collector timeout handling |
| π Reliability | Better reconnect handling and safer player state checks |
| Layer | Tools |
|---|---|
| π¬ Bot Framework | discord.js v14 |
| πΆ Audio Layer | riffy + Lavalink v4 |
| π§ Language | TypeScript |
| ποΈ Storage | better-sqlite3 + Drizzle ORM |
| ποΈ UI System | Discord Components V2 |
| π Config | dotenv |
| π Integrations | Top.gg SDK, Genius Lyrics API |
| π§± Architecture | Typed commands, events, handlers, storage, and utils |
Supported platforms depend on your Lavalink configuration and plugins.
/play,/skip,/stop,/pause,/resume,/queue,/seek,/shuffle- Now playing panels with interactive control buttons
- Autoplay improvements and stronger current-track checks
- 24/7 mode with persisted guild settings
/playlist-create/playlist-add/playlist-load/playlist-view/playlist-remove/playlist-delete
/help/node/ping/about/avatar/serverinfo/uptime
/eval/shards
src/
commands/
hybrid/
interaction/
developer/
information/
music/
playlist/
utility/
events/
bot/client/
riffy/node/
riffy/player/
handlers/
settings/
storage/
types/
utils/git clone https://github.com/koddyvx/Nexa-Music.git
cd Nexa-MusicRecommended:
bun installNode fallback:
npm installcp .env.example .envMinimum:
TOKEN=your_discord_bot_tokenOptional:
TOPGG_TOKEN- vote webhook values if used
- Genius token for lyrics support
Update [src/settings/config.ts]:
clientidprefix- Lavalink node
host,port,password, andsecure developersgeniusToken
bun run typecheck
bun run build
bun run startDirect bot process:
bun run start:botNode fallback:
npm run typecheck
npm run build
npm run start:node| Requirement | Version |
|---|---|
| π§ Bun | 1.2+ recommended |
| π’ Node.js | 18+ |
| β Java | 17+ recommended for Lavalink |
| ποΈ Lavalink | v4 |
| π€ Discord Bot | Valid token and application setup |
| Item | Path |
|---|---|
| DB Init | src/storage/db.ts |
| Schema | src/storage/schema.ts |
| Playlists | src/storage/playlists.ts |
| Guild Settings | src/storage/guildSettings.ts |
| Config | drizzle.config.ts |
| SQLite File | storage/nexa.sqlite |
Drizzle commands:
npm run db:generate
npm run db:push
npm run db:studio- Shared panel helpers live in
src/utils/discord.ts - Help and node commands use collectors with timeout lock behavior
- Playback responses are standardized around the same panel system
/247 mode:onenables persistent 24/7 mode per guild- Queue end will not disconnect when 24/7 is enabled
- Voice disconnects can trigger reconnect handling
- Node disconnects retry automatically with logged status
- π΅ Full TypeScript migration
- π¨ Advanced Components V2 UI flow
- πΎ SQLite + Drizzle playlist persistence
- π§© Hybrid prefix/slash command structure
- π Stronger node diagnostics and player state handling
- π Better permission and interaction guards
See [MIGRATION.md](/media/razi/840AA8230AA813E8/RAZI ALL FILES/RAZI EFX GAMEFILES AND CLEOS VC/ALL PROJECTS/Discord Bots/Nexa-Music/MIGRATION.md) for upgrade guidance.
- Discord: https://discord.gg/fbu64BmPFD
- Open an issue on GitHub
- Submit a PR with clear change notes
- Discord bot setup: https://discordjs.guide/preparations/setting-up-a-bot-application.html
- Lavalink docs: https://lavalink.dev/
- Riffy package: https://www.npmjs.com/package/riffy
This project is licensed under MIT. Please follow Discord and streaming platform terms when deploying publicly.
πΆ Built by KoDdy and Razi under Infinity.