summaryrefslogtreecommitdiff
path: root/discord/discord.cpp
diff options
context:
space:
mode:
authorouwou <26526779+ouwou@users.noreply.github.com>2020-08-27 18:50:53 -0400
committerouwou <26526779+ouwou@users.noreply.github.com>2020-08-27 18:50:53 -0400
commit8699a547f3d51504cd0aa695f580315b8fe27678 (patch)
treeb8775829fc53776d0c6db8ee7ee42ed7ddaf23f6 /discord/discord.cpp
parent34b572db40a096aa7f411f837d7ae6884209a3f6 (diff)
downloadabaddon-portaudio-8699a547f3d51504cd0aa695f580315b8fe27678.tar.gz
abaddon-portaudio-8699a547f3d51504cd0aa695f580315b8fe27678.zip
read embed json
Diffstat (limited to 'discord/discord.cpp')
-rw-r--r--discord/discord.cpp44
1 files changed, 44 insertions, 0 deletions
diff --git a/discord/discord.cpp b/discord/discord.cpp
index 15a719c..66e449c 100644
--- a/discord/discord.cpp
+++ b/discord/discord.cpp
@@ -494,6 +494,50 @@ void from_json(const nlohmann::json &j, UserSettingsData &m) {
JS_D("afk_timeout", m.AFKTimeout);
}
+void from_json(const nlohmann::json &j, EmbedFooterData &m) {
+ JS_D("text", m.Text);
+ JS_O("icon_url", m.IconURL);
+ JS_O("proxy_icon_url", m.ProxyIconURL);
+}
+
+void from_json(const nlohmann::json &j, EmbedImageData &m) {
+ JS_O("url", m.URL);
+ JS_O("proxy_url", m.ProxyURL);
+ JS_O("height", m.Height);
+ JS_O("width", m.Width);
+}
+
+void from_json(const nlohmann::json &j, EmbedThumbnailData &m) {
+ JS_O("url", m.URL);
+ JS_O("proxy_url", m.ProxyURL);
+ JS_O("height", m.Height);
+ JS_O("width", m.Width);
+}
+
+void from_json(const nlohmann::json &j, EmbedVideoData &m) {
+ JS_O("url", m.URL);
+ JS_O("height", m.Height);
+ JS_O("width", m.Width);
+}
+
+void from_json(const nlohmann::json &j, EmbedProviderData &m) {
+ JS_O("name", m.Name);
+ JS_O("url", m.URL);
+}
+
+void from_json(const nlohmann::json &j, EmbedAuthorData &m) {
+ JS_O("name", m.Name);
+ JS_O("url", m.URL);
+ JS_O("icon_url", m.IconURL);
+ JS_O("proxy_icon_url", m.ProxyIconURL);
+}
+
+void from_json(const nlohmann::json &j, EmbedFieldData &m) {
+ JS_D("name", m.Name);
+ JS_D("value", m.Value);
+ JS_O("inline", m.Inline);
+}
+
void to_json(nlohmann::json &j, const IdentifyProperties &m) {
j["$os"] = m.OS;
j["$browser"] = m.Browser;