Skip to content

koddyvx/Nexa-Music

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

107 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎡 Nexa Music v2

Nexa Music v2 banner

Release v2.0.0 Bun 1.2+ Node.js 18+ TypeScript 5.x discord.js v14 Lavalink v4

Support server Components V2 SQLite and Drizzle MIT License

🎧 Modern Discord music bot with typed architecture, polished music panels, playlist persistence, and production-ready Lavalink flow.

🎼 Overview

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.

✨ What's New In v2

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

πŸ› οΈ Tech Stack

Tech stack icons

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 Music Sources

YouTube YouTube Music SoundCloud Spotify Apple Music Deezer

Supported platforms depend on your Lavalink configuration and plugins.

🎹 Feature Set

🎡 Music

  • /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

  • /playlist-create
  • /playlist-add
  • /playlist-load
  • /playlist-view
  • /playlist-remove
  • /playlist-delete

πŸ“Š Info + Utility

  • /help
  • /node
  • /ping
  • /about
  • /avatar
  • /serverinfo
  • /uptime

πŸ›‘οΈ Developer

  • /eval
  • /shards

🧱 Project Structure

src/
  commands/
    hybrid/
    interaction/
      developer/
      information/
      music/
      playlist/
      utility/
  events/
    bot/client/
    riffy/node/
    riffy/player/
  handlers/
  settings/
  storage/
  types/
  utils/

πŸš€ Quick Start

1. Clone the repository

git clone https://github.com/koddyvx/Nexa-Music.git
cd Nexa-Music

2. Install dependencies

Recommended:

bun install

Node fallback:

npm install

3. Create your environment file

cp .env.example .env

Minimum:

TOKEN=your_discord_bot_token

Optional:

  • TOPGG_TOKEN
  • vote webhook values if used
  • Genius token for lyrics support

4. Configure the bot

Update [src/settings/config.ts]:

  • clientid
  • prefix
  • Lavalink node host, port, password, and secure
  • developers
  • geniusToken

5. Build and run

bun run typecheck
bun run build
bun run start

Direct bot process:

bun run start:bot

Node fallback:

npm run typecheck
npm run build
npm run start:node

βš™οΈ Requirements

Requirement Version
🎧 Bun 1.2+ recommended
🟒 Node.js 18+
β˜• Java 17+ recommended for Lavalink
πŸŽ›οΈ Lavalink v4
πŸ€– Discord Bot Valid token and application setup

πŸ’Ύ Database Guide

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

πŸŽ›οΈ Components V2 UI

  • 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

πŸ” 24/7 + Reconnect Notes

  • /247 mode:on enables 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

πŸ“¦ Release Notes

v2.0.0

  • 🎡 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.

🀝 Support

πŸ“š Useful Links

πŸ“„ License

This project is licensed under MIT. Please follow Discord and streaming platform terms when deploying publicly.

🎢 Built by KoDdy and Razi under Infinity.