small fix
This commit is contained in:
parent
65cffef560
commit
06a30e0458
@ -15,24 +15,33 @@ namespace demonware
|
||||
{
|
||||
auto motd_content = utils::http::get_data("https://h1.gg/data/motd.json");
|
||||
auto motd = new bdMarketingMessage;
|
||||
motd->m_messageID = 1;
|
||||
motd->m_languageCode = "en-US";
|
||||
motd->m_content = motd_content.value().buffer.data();
|
||||
motd->m_metadata = "{}";
|
||||
if (motd_content.has_value())
|
||||
{
|
||||
motd->m_messageID = 1;
|
||||
motd->m_languageCode = "en-US";
|
||||
motd->m_content = motd_content.value().buffer.data();
|
||||
motd->m_metadata = "{}";
|
||||
}
|
||||
|
||||
auto featured_content = utils::http::get_data("https://h1.gg/data/featured.json");
|
||||
auto featured = new bdMarketingMessage;
|
||||
featured->m_messageID = 2;
|
||||
featured->m_languageCode = "en-US";
|
||||
featured->m_content = featured_content.value().buffer.data();
|
||||
featured->m_metadata = "{}";
|
||||
if (featured_content.has_value())
|
||||
{
|
||||
featured->m_messageID = 2;
|
||||
featured->m_languageCode = "en-US";
|
||||
featured->m_content = featured_content.value().buffer.data();
|
||||
featured->m_metadata = "{}";
|
||||
}
|
||||
|
||||
auto featured2_content = utils::http::get_data("https://h1.gg/data/featured2.json");
|
||||
auto featured2 = new bdMarketingMessage;
|
||||
featured2->m_messageID = 3;
|
||||
featured2->m_languageCode = "en-US";
|
||||
featured2->m_content = featured2_content.value().buffer.data();
|
||||
featured2->m_metadata = "{}";
|
||||
if (featured2_content.has_value())
|
||||
{
|
||||
featured2->m_messageID = 3;
|
||||
featured2->m_languageCode = "en-US";
|
||||
featured2->m_content = featured2_content.value().buffer.data();
|
||||
featured2->m_metadata = "{}";
|
||||
}
|
||||
|
||||
auto reply = server->create_reply(this->task_id());
|
||||
reply->add(motd);
|
||||
|
Loading…
Reference in New Issue
Block a user