query("SELECT setting_key, setting_value FROM bot_settings"); $settings = []; while ($row = $stmt->fetch()) { $settings[$row['setting_key']] = $row['setting_value']; } $botToken = $settings['bot_token'] ?? ''; $prefix = $settings['prefix'] ?? '/'; $projectDescription = $_SERVER['PROJECT_DESCRIPTION'] ?? 'Advanced Discord Music Bot powered by DisTube'; $projectImageUrl = $_SERVER['PROJECT_IMAGE_URL'] ?? ''; ?> MusicBot Dashboard

Your Music, Elevated.

The most stable Discord music player with DisTube support. High-quality audio, zero timeout, and support for all your favorite platforms.

Configure Bot View Commands

Powerful Commands

🎵 Playback

play Search & play song
skip Next song
stop Stop music & leave
pause Pause playback

📋 Queue

queue Show current queue
nowplaying Current song info
shuffle Shuffle queue
volume Change volume

⚙️ Simulation

Try typing /play [song] below to see the bot in action.

MB
MusicBot BOT
Welcome! Use /play to start listening.

Bot Configuration

Save your Discord bot credentials here. These settings will be stored in your private database.

Implementation Guide

To run this bot locally or on your server, ensure you have Node.js installed and use the following code based on your requirements (DisTube v4 + Discord.js v14).

1. Install Dependencies:
npm install discord.js distube @distube/yt-dlp play-dl ffmpeg-static @discordjs/voice
2. Bot Core Code (index.js):
const { Client, GatewayIntentBits } = require('discord.js');
const { DisTube } = require('distube');
const { YtDlpPlugin } = require('@distube/yt-dlp');
const ffmpeg = require('ffmpeg-static');

const client = new Client({
    intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildVoiceStates, GatewayIntentBits.GuildMessages, GatewayIntentBits.MessageContent]
});

const distube = new DisTube(client, {
    emitNewSongOnly: true,
    leaveOnFinish: false,
    ffmpegPath: ffmpeg, // Fix for suara music
    plugins: [new YtDlpPlugin()]
});

client.on('interactionCreate', async interaction => {
    if (!interaction.isChatInputCommand()) return;
    if (interaction.commandName === 'play') {
        await interaction.deferReply(); // Anti-stuck
        const query = interaction.options.getString('query');
        distube.play(interaction.member.voice.channel, query, {
            textChannel: interaction.channel,
            member: interaction.member
        });
        await interaction.editReply(`Searching for: ${query}`);
    }
});

client.login('YOUR_TOKEN_HERE');
Settings saved successfully!