#pragma once #include #include #include // Builds and sends the same "stock update" embed the python script sent via // webhook, but preferring the bot's own REST API (POST /channels/{id}/messages) // since we now have a real bot token. Falls back to a legacy webhook URL if // no channel id is configured. class DiscordNotifier { public: DiscordNotifier(std::string bot_token, std::string channel_id, std::string webhook_url); void sendStockUpdate(const std::string& url, const std::vector& offers, const std::string& change_text, bool ping, std::optional min_price, std::optional max_price, const std::vector& keywords); private: std::string bot_token_; std::string channel_id_; std::string webhook_url_; std::string buildPayload(const std::string& url, const std::vector& offers, const std::string& change_text, bool ping, std::optional min_price, std::optional max_price, const std::vector& keywords) const; };