From 11e2e5f33bc417a79b5d467260f29cefec53cd02 Mon Sep 17 00:00:00 2001 From: Cynthia Foxwell Date: Sun, 3 Apr 2022 10:44:11 -0600 Subject: [PATCH] utility.avatar: filter embeds --- src/modules/utility.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/utility.js b/src/modules/utility.js index a166f4e..8dba2fa 100644 --- a/src/modules/utility.js +++ b/src/modules/utility.js @@ -148,7 +148,7 @@ avatar.callback = async function (msg, line) { guildEmbed.image = {url: guildUrl}; return { - embeds: [baseEmbed, guildAvatar && guildEmbed], + embeds: [baseEmbed, guildAvatar && guildEmbed].filter((x) => x != null), }; } } else { @@ -192,7 +192,7 @@ avatar.callback = async function (msg, line) { guildEmbed.image = {url: guildUrl}; return { - embeds: [baseEmbed, guildAvatar && guildEmbed], + embeds: [baseEmbed, guildAvatar && guildEmbed].filter((x) => x != null), }; } };