Files
ghbot/src/commands/prefix/reboot.js
Chris Ham 98ed84aa2b Fix reboot command configuration reference
- Update reboot command to use ConfigManager instead of raw config
- Fix broken adminUserId reference that was causing command errors
- Use getBotConfig() method to properly access admin configuration
- Ensure reboot command works with hybrid database/file config system

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-16 21:50:35 -07:00

23 lines
618 B
JavaScript

const configManager = require("../../config/config");
module.exports = {
name: "reboot",
description: "Reboot the bot (admin only)",
async execute(message, args, guildConfig) {
// Get bot configuration
const botConfig = configManager.getBotConfig();
// Check if user is the bot admin
if (message.author.id !== botConfig.discord.adminUserId) {
return;
}
await message.reply("Rebooting...");
console.log(`Reboot requested by ${message.author.username}`);
// Exit the process - requires a process manager like PM2 or Docker restart policy
process.exit(0);
},
};