From 4bce7b7523caa26023b1a2f5e02e6646ed29f5e0 Mon Sep 17 00:00:00 2001 From: ouwou <26526779+ouwou@users.noreply.github.com> Date: Fri, 15 Dec 2023 01:16:11 -0500 Subject: add ability to set image alt text (closes #253) --- src/discord/objects.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/discord/objects.cpp') diff --git a/src/discord/objects.cpp b/src/discord/objects.cpp index 4ad17c3..804f10d 100644 --- a/src/discord/objects.cpp +++ b/src/discord/objects.cpp @@ -306,9 +306,15 @@ void to_json(nlohmann::json &j, const HeartbeatMessage &m) { j["d"] = m.Sequence; } +void to_json(nlohmann::json &j, const CreateMessageAttachmentObject &m) { + j["id"] = m.ID; + JS_IF("description", m.Description); +} + void to_json(nlohmann::json &j, const CreateMessageObject &m) { j["content"] = m.Content; j["flags"] = m.Flags; + JS_IF("attachments", m.Attachments); JS_IF("message_reference", m.MessageReference); JS_IF("nonce", m.Nonce); } -- cgit v1.2.3