mirror of
https://github.com/Syping/dtranslatebot.git
synced 2026-04-01 21:30:40 +02:00
use dpp::cluster::post_rest to send Webhook request
This commit is contained in:
parent
ccd2736c63
commit
7ee916537c
5 changed files with 10 additions and 30 deletions
|
|
@ -21,7 +21,7 @@
|
|||
#include "settings.h"
|
||||
using namespace std::chrono_literals;
|
||||
|
||||
inline bot::translated_message make_translated_message(const bot::message &message, const std::string &translated_message, const std::string &webhook)
|
||||
inline bot::translated_message make_translated_message(const bot::message &message, const std::string &translated_message, const dpp::webhook &webhook)
|
||||
{
|
||||
bot::translated_message tr_message;
|
||||
tr_message.author = message.author;
|
||||
|
|
@ -95,7 +95,7 @@ void bot::message_queue::run(bot::settings::settings *settings, bot::submit_queu
|
|||
std::cerr << "Exception thrown while translating: unknown" << std::endl;
|
||||
}
|
||||
|
||||
submit_queue->add(make_translated_message(message, tr_message, target->webhook));
|
||||
submit_queue->add(make_translated_message(message, tr_message, dpp::webhook(target->webhook)));
|
||||
}
|
||||
|
||||
std::this_thread::yield();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue