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>
This commit is contained in:
@@ -1,12 +1,15 @@
|
||||
const config = require("../../config/config");
|
||||
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 !== config.discord.adminUserId) {
|
||||
if (message.author.id !== botConfig.discord.adminUserId) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user