mirror of
https://github.com/discordeno/discordeno.git
synced 2026-09-17 08:47:22 +00:00
add: new EditMessage#embeds
This commit is contained in:
@@ -29,6 +29,12 @@ export async function editMessage(channelId: bigint, messageId: bigint, content:
|
||||
validateComponents(content.components);
|
||||
}
|
||||
|
||||
// TODO: v12 remove
|
||||
if (content.embed) content.embeds = [content.embed, ...(content.embeds || [])];
|
||||
if (content.embeds && content.embeds.length > 10) {
|
||||
content.embeds.splice(10);
|
||||
}
|
||||
|
||||
if (content.content && content.content.length > 2000) {
|
||||
throw new Error(Errors.MESSAGE_MAX_LENGTH);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user