#pragma once #include "Command.hpp" #include #include #include namespace Echoion::Core { class ReloadCommand : public Command { public: void execute(const CommandContext& ctx) override { Void::Log::info("ReloadCommand", "{}", "Reload requested by user"); // Reload configuration from disk. A full core/plugin reload is // driven from the TS plugin menu (that lives in the plugin). if (auto core = ctx.service()) { auto result = core->reloadConfig(); if (result) { ctx.reply( ctx.tr("✅ Configuration reloaded. For a full core " "reload, use the TS plugin menu.")); } else { ctx.reply(std::string("❌ Config reload failed: ") + result.error().message); } } else { ctx.reply( ctx.tr("Reload is handled by the plugin. Use the TS " "plugin menu to reload the core.")); } } std::string_view getDescription() const override { return "Shows information about reloading the bot."; } CommandCategory getCategory() const override { return CommandCategory::Admin; } bool requiresAdmin() const override { return true; } std::vector getAliases() const override { return {"restart", "r"}; } }; } // namespace Echoion::Core