summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/routes/api/v8/channels/#channel_id/messages/index.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/routes/api/v8/channels/#channel_id/messages/index.ts b/src/routes/api/v8/channels/#channel_id/messages/index.ts

index 2f383056..b2eb8ef4 100644 --- a/src/routes/api/v8/channels/#channel_id/messages/index.ts +++ b/src/routes/api/v8/channels/#channel_id/messages/index.ts
@@ -111,6 +111,9 @@ router.post("/", check(MessageCreateSchema), async (req, res) => { // TODO: should it be checked if the message exists? } + const embeds = []; + if (body.embed) embeds.push(body.embed); + const message: Message = { id: Snowflake.generate(), channel_id, @@ -118,6 +121,8 @@ router.post("/", check(MessageCreateSchema), async (req, res) => { author_id: req.user_id, content: req.body, timestamp: new Date(), + embeds, + attachments: [], }; await new MessageModel(message).save();