prepare('UPDATE bot_settings SET prefix = :prefix, max_volume = :max_volume, auto_reconnect = :auto_reconnect, log_level = :log_level, discord_token = :discord_token, discord_app_id = :discord_app_id, discord_public_key = :discord_public_key WHERE id = :id'); $stmt->execute([ ':prefix' => $prefix, ':max_volume' => $max_volume, ':auto_reconnect' => $auto_reconnect, ':log_level' => $log_level, ':discord_token' => $discord_token, ':discord_app_id' => $discord_app_id, ':discord_public_key' => $discord_public_key, ':id' => $settings['id'], ]); add_log('Admin', 'Settings Update', 'Bot settings were updated.'); // If credentials changed, try to auto-sync slash commands if ($discord_token !== $settings['discord_token'] || $discord_app_id !== $settings['discord_app_id']) { require_once __DIR__ . '/bot/register_commands.php'; $syncResult = register_commands(); add_log('System', 'Auto-Sync Commands', $syncResult); } $settings = get_settings(); // Refresh $saved = true; } if ($_SERVER['REQUEST_METHOD'] === 'POST' && ($_POST['action'] ?? '') === 'restart_bot') { // Kill existing processes shell_exec("pkill -f 'bot/worker.php'"); // Start new one shell_exec("nohup php " . __DIR__ . "/bot/worker.php > " . __DIR__ . "/bot/bot.log 2>&1 &"); add_log('Admin', 'Worker Restart', 'The bot worker process was manually restarted from settings.'); $saved = true; // Trigger toast } if ($_SERVER['REQUEST_METHOD'] === 'POST' && ($_POST['action'] ?? '') === 'sync_commands') { require_once __DIR__ . '/bot/register_commands.php'; $syncResult = register_commands(); add_log('Admin', 'Manual Command Sync', $syncResult); $saved = true; } $projectDescription = $_SERVER['PROJECT_DESCRIPTION'] ?? ''; $projectImageUrl = $_SERVER['PROJECT_IMAGE_URL'] ?? ''; $projectName = $_SERVER['PROJECT_NAME'] ?? 'Discord Music Bot Control Center'; ?> <?= h($projectName) ?> — Settings

Administration

Bot policy settings

Define default controls for who can use music commands and how playback is handled.

Bot Credentials

Manage your Discord application keys. Keep these private.

Found in Discord Developer Portal > Bot > Token.
Slash Commands Setup

To use slash commands like /play, copy this URL into your Discord Developer Portal > General Information > Interactions Endpoint URL:

Note: Make sure your Public Key is saved above before Discord can verify this URL.

Behavior Settings

>
Back to dashboard
Slash Commands Sync

If you've updated your Bot Token or App ID, you may need to manually refresh the commands on Discord.

Process Control

Manage the background bot worker. Use this if the bot stops responding or after updating sensitive settings.

The worker process handles the queue and connections.

Policy preview

Prefix

Max volume

%

Auto-reconnect

These defaults will be used by the bot runtime service.

Stability checklist

  • Auto-reconnect enabled for voice sessions.
  • Log level set to capture errors.
  • Volume limits keep playback stable.