From f4ae1e337c8714c903fc248c76667946a94473a6 Mon Sep 17 00:00:00 2001 From: Will Hunt <will@half-shot.uk> Date: Thu, 25 Oct 2018 21:24:25 +0100 Subject: [PATCH] undef guard webhook object --- src/bot.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bot.ts b/src/bot.ts index 61b2e1a..f4c6b32 100644 --- a/src/bot.ts +++ b/src/bot.ts @@ -268,7 +268,7 @@ export class DiscordBot { username: embed.author.name, avatarURL: embed.author.icon_url, file: opts.file, - embeds: [embedSet.replyEmbed], + embeds: embedSet.replyEmbed ? [embedSet.replyEmbed] : undefined, } as any); } else { if (embedSet.replyEmbed) { -- GitLab