#pragma once #include #include #include #include // --- Play Command --- class Subscribe : public Command { public: void execute(const CommandContext& ctx) override { if (ctx.musicManager.expired()) { LOG_ERROR("MusicManager is expired"); return; } std::string args(ctx.args); std::string invoker(ctx.invokerName); if (ctx.musicManager.lock()->subscribe(ctx.clientID)) { ctx.reply("You are now subscribed to the music bot."); } else { ctx.reply("Already subscribed to the music bot."); } } CommandCategory getCategory() const override { return CommandCategory::Session; } std::vector getAliases() const override { return {"sub"}; } std::string_view getDescription() const override { return "Subscribe on playback from bot."; } std::string_view getUsage() const override { return ""; } };