query("SELECT * FROM settings"); while ($row = $stmt->fetch()) { $settings[$row['setting_key']] = $row['setting_value']; } } catch (Exception $e) { // Table might not exist yet or other error } $discordToken = $settings['discord_token'] ?? ''; $applicationId = $settings['application_id'] ?? ''; // Helper function to check if bot is running (simplified) function isBotRunning(): bool { $output = []; exec("ps aux | grep 'node index.js' | grep -v grep", $output); return !empty($output); } // Project info $projectName = $_SERVER['PROJECT_NAME'] ?? 'Sahur Alarm Bot'; $projectDescription = $_SERVER['PROJECT_DESCRIPTION'] ?? 'Discord voice bot for sahur alarms.'; ?> <?= htmlspecialchars($projectName) ?> - Control Panel
System Overview

Welcome to your Sahur Bot Panel


Bot Source Code (index.js)

The bot is built using Node.js and discord.js v14. It handles the /join and /sahur commands, joins your voice channel, and plays the alarm.

Quick Start:
  1. Masukkan Application ID dan Bot Token di panel kanan, lalu klik Save.
  2. Klik Deploy Slash Commands agar perintah /join dan /sahur muncul di Discord.
  3. Klik Start Bot untuk mengaktifkan bot.
Logs & Activity
Audio Management

Upload your sahur.mp3 file here. Ensure it is named exactly sahur.mp3.

🔊 sahur.mp3 ( MB)
⚠️ sahur.mp3 not found.
Bot Configuration

To link your bot, you need to provide credentials from the Discord Developer Portal.

Settings saved!
Slash commands deployed!
Error deploying commands. Check logs.
Error saving settings.

Click this if slash commands (/sahur) are not showing up in Discord.

Deploy Slash Commands

Config is saved to the database and config.json.