#ifndef API_CHANNEL_HPP_ #define API_CHANNEL_HPP_ #include #include class Channel { private: nlohmann::json data; WebSocket& web; NetworkManager& req; public: Channel(const nlohmann::json& data = "") : data(data), web(WebSocket::getInstance()), req(NetworkManager::getInstance()) {} std::string send(const nlohmann::json& msg) { return req.request(HttpMethods::POST, DiscordEndpoints::details::latest + "/channels/" + data["d"]["channel_id"].get() + "/messages", msg.dump()); } }; #endif