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($projectDescription) ?>
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.
/join dan /sahur muncul di Discord.Upload your sahur.mp3 file here. Ensure it is named exactly sahur.mp3.
To link your bot, you need to provide credentials from the Discord Developer Portal.
Click this if slash commands (/sahur) are not showing up in Discord.
Config is saved to the database and config.json.