output refactor

This commit is contained in:
Syping 2024-02-04 10:12:19 +01:00
parent 7e3696ce90
commit e2f3739fa1
6 changed files with 23 additions and 25 deletions

View file

@ -79,7 +79,7 @@ void bot::webhook_push::push_request(dpp::snowflake webhook_id, const std::strin
std::future<dpp::http_request_completion_t> _f = _p.get_future();
bot->post_rest(API_PATH "/webhooks", std::to_string(webhook_id), dpp::utility::url_encode(webhook_token), dpp::m_post, json, [bot, &_p](dpp::json &json, const dpp::http_request_completion_t &event) {
if (event.status != 204)
std::cerr << "[dtranslatebot] [WARNING] Webhook push returned unexpected code " << event.status << std::endl;
std::cerr << "[Warning] Webhook push returned unexpected code " << event.status << std::endl;
_p.set_value(event);
});
_f.wait();