utility.avatar: filter embeds

This commit is contained in:
Cynthia Foxwell 2022-04-03 10:44:11 -06:00
parent 584f61178f
commit 11e2e5f33b

View file

@ -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),
};
}
};