3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-18 15:00:00 +00:00

Fix embed logs

This commit is contained in:
Dragory 2021-08-19 18:59:11 +03:00
parent e2be447de5
commit dc53de8ae3
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1

View file

@ -133,8 +133,17 @@ export async function getLogMessage<TLogType extends keyof ILogTypeData>(
if (timestamp) { if (timestamp) {
formatted = `\`[${timestamp}]\` ${formatted}`; formatted = `\`[${timestamp}]\` ${formatted}`;
} }
} else if (formatted != null && formatted.embed && includeEmbedTimestamp) { } else if (formatted != null) {
formatted.embed.timestamp = isoTimestamp; if (formatted.embed) {
formatted.embeds = [formatted.embed];
delete formatted.embed;
}
if (formatted.embeds && Array.isArray(formatted.embeds) && includeEmbedTimestamp) {
for (const embed of formatted.embeds) {
embed.timestamp = isoTimestamp;
}
}
} }
return formatted; return formatted;