3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-10 12:25:02 +00:00

Fix issues around embeds

This commit is contained in:
Dragory 2021-08-19 19:33:47 +03:00
parent dc53de8ae3
commit 81514276e9
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1
8 changed files with 111 additions and 21 deletions

View file

@ -13,6 +13,7 @@ import {
messageSummary,
renderRecursively,
resolveMember,
validateAndParseMessageContent,
verboseChannelMention,
verboseUserMention,
verboseUserName,
@ -134,10 +135,7 @@ export async function getLogMessage<TLogType extends keyof ILogTypeData>(
formatted = `\`[${timestamp}]\` ${formatted}`;
}
} else if (formatted != null) {
if (formatted.embed) {
formatted.embeds = [formatted.embed];
delete formatted.embed;
}
formatted = validateAndParseMessageContent(formatted);
if (formatted.embeds && Array.isArray(formatted.embeds) && includeEmbedTimestamp) {
for (const embed of formatted.embeds) {