3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-21 16:55:03 +00:00

fix the thing

This commit is contained in:
metal 2021-08-30 17:43:54 +00:00 committed by GitHub
parent 807e7c9ce8
commit b01e73125a

View file

@ -114,7 +114,7 @@ export async function log<TLogType extends keyof ILogTypeData>(
if (!msgEmbeds || msgEmbeds.length === 0) continue;
// check if the latest chunk is an embed, if not, make it one
if (typeof lastEntry !== "string" && lastEntry!.embeds) {
if (typeof lastEntry !== "string" && lastEntry?.embeds) {
(chunks[chunks.length - 1] as MessageOptions).embeds!.push(...msgEmbeds);
} else {
chunks.push({ embeds: msgEmbeds });