deserialize message attachments for the future

This commit is contained in:
ouwou
2020-09-10 01:15:44 -04:00
parent 6ae9cc915d
commit fc389441f8
2 changed files with 24 additions and 2 deletions

View File

@@ -60,6 +60,16 @@ void from_json(const nlohmann::json &j, EmbedData &m) {
JS_O("fields", m.Fields);
}
void from_json(const nlohmann::json &j, AttachmentData &m) {
JS_D("id", m.ID);
JS_D("filename", m.Filename);
JS_D("size", m.Bytes);
JS_D("url", m.URL);
JS_D("proxy_url", m.ProxyURL);
JS_N("height", m.Height);
JS_N("width", m.Width);
}
void from_json(const nlohmann::json &j, Message &m) {
JS_D("id", m.ID);
JS_D("channel_id", m.ChannelID);