- High-quality audio streaming with Discord.js voice
- Search and play music from multiple sources
- Spotify integration - Play tracks and playlists directly from Spotify URLs
- Interactive search - Select from multiple search results
- Progress tracking with visual progress bars
- β―οΈ Play/Pause - Full playback control
- βοΈ Skip - Skip current track
- βΉοΈ Stop - Stop playback and clear queue
βΆοΈ Resume - Resume paused tracks- π Loop - Loop individual tracks or entire queue
- π Shuffle - Randomize queue order
- π View Queue - Interactive paginated queue display
- ποΈ Clear Queue - Remove all or specific tracks
- πΆ Autoplay - Automatically play recommended tracks when queue ends
- π Queue Status - Real-time queue updates
βοΈ Smart Join - Automatically join voice channels- π Auto Disconnect - Leave when no users present
- π Stage Channel Support - Full compatibility with Discord stage channels
- π Permission Handling - Intelligent permission checking
- π Now Playing - Rich embed with track information and progress
- π Ping Command - Bot latency and uptime information
- π Help System - Comprehensive command listing
- π― Real-time Status - Dynamic bot status updates
- Node.js 16.9.0 or higher
- Discord Bot Token
- MongoDB URI (optional, for advanced features)
-
Clone the repository
git clone https://github.com/VanXodus305/Spectron.git cd Spectron -
Install dependencies
npm install
-
Configure environment variables Create a
.envfile in the root directory:Discord_Token=your_discord_bot_token MongoDB_URI=your_mongodb_connection_string Song_API_URL=your_music_api_url Spotify_Client_ID=your_spotify_client_id Spotify_Client_Secret=your_spotify_client_secret
-
Start the bot
# Development mode with auto-restart npm run dev # Production mode npm start
| Command | Description | Usage |
|---|---|---|
/play |
Search and play music in a voice channel | /play query:song name |
/pause |
Pause the currently playing track | /pause |
/resume |
Resume the paused track | /resume |
/skip |
Skip the current track | /skip |
/stop |
Stop playback and clear queue | /stop |
/nowplaying |
Show current track information | /nowplaying |
/join |
Join your voice channel | /join |
/leave |
Leave the voice channel | /leave |
| Command | Description | Usage |
|---|---|---|
/loop track |
Loop the current track | /loop track choice:true/false |
/loop queue |
Loop the entire queue | /loop queue choice:true/false |
/shuffle |
Shuffle the current queue | /shuffle |
/autoplay |
Enable/disable autoplay | /autoplay choice:true/false |
| Command | Description | Usage |
|---|---|---|
/queue view |
View the current queue | /queue view |
/queue clear |
Clear the entire queue | /queue clear |
/queue clear |
Remove specific track | /queue clear track:position |
| Command | Description | Usage |
|---|---|---|
/help |
List all available commands | /help |
/ping |
Show bot latency and uptime | /ping |
- TypeScript for type safety and better development experience
- WOKCommands for advanced command handling
- Modular design with separate features and utilities
- Event-driven architecture for responsive interactions
- @discordjs/voice for high-quality audio streaming
- FFmpeg for audio processing
- Smart buffering for smooth playback
- Error recovery and connection stability
- Spotify API integration for playlist and track resolution
- Progress tracking with visual progress bars
- Interactive components with buttons and select menus
- Auto-disconnect when voice channel is empty
- Permission validation for voice channels
- Efficient queue management with Collection-based storage
- Memory optimization for large playlists
- Graceful error handling throughout the application
- Connection pooling for database operations
| Variable | Description | Required |
|---|---|---|
Discord_Token |
Your Discord bot token | β |
MongoDB_URI |
MongoDB connection string | β |
Song_API_URL |
Music API endpoint | β |
Spotify_Client_ID |
Spotify application client ID | β |
Spotify_Client_Secret |
Spotify application client secret | β |
Ensure your bot has the following permissions:
- Send Messages
- Use Slash Commands
- Connect (to voice channels)
- Speak (in voice channels)
- Use Voice Activity
- Request to Speak (for stage channels)
- Mute Members (for stage channels)
npm run devnpm startFROM node:16-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production
COPY . .
RUN npm run build
CMD ["npm", "start"]- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow TypeScript best practices
- Maintain consistent code formatting
- Add appropriate error handling
- Update documentation for new features
If you encounter any issues or need support:
- Check the existing issues
- Create a new issue with detailed information
- Include logs and error messages when applicable
- Advanced queue manipulation (remove specific positions)
- Personal playlist management
- Interactive buttons for player controls
- Volume control per server
- Music filters and effects
- Last.fm integration
- Multi-language support
This project is licensed under the ISC License - see the LICENSE file for details.
- Discord.js community for excellent documentation
- WOKCommands for the command framework
- Spotify for their comprehensive API
- All contributors and users of Spectron
Made with β€οΈ by VanXodus305