mirror of
https://github.com/Syping/dtranslatebot.git
synced 2025-12-14 23:56:26 +01:00
more refactoring
This commit is contained in:
parent
b09da9cfce
commit
7e3696ce90
5 changed files with 47 additions and 32 deletions
|
|
@ -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 << "[dtranslatebot] [WARNING] Webhook push returned unexpected code " << event.status << std::endl;
|
||||
_p.set_value(event);
|
||||
});
|
||||
_f.wait();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue