From 266bcaac42ea03cc6a3181f346700e71e41a5698 Mon Sep 17 00:00:00 2001 From: Cynthia Foxwell Date: Wed, 15 Nov 2023 14:11:33 -0700 Subject: [PATCH] utility.guildinfo: ignore 0 emotes/stickers --- src/modules/utility.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/modules/utility.js b/src/modules/utility.js index 67b53de..0e0c058 100644 --- a/src/modules/utility.js +++ b/src/modules/utility.js @@ -1911,7 +1911,7 @@ guildinfo.callback = async function (msg, line) { } integration`, inline: true, }, - { + guild.emojis.length > 0 && { name: `Emotes (${guild.emojis.length})`, value: `${ guild.emojis.filter((e) => e.animated).length @@ -1922,7 +1922,7 @@ guildinfo.callback = async function (msg, line) { } unavailable`, inline: true, }, - { + guild.stickers.length > 0 && { name: `Stickers (${guild.stickers.length})`, value: `${ guild.stickers.filter((s) => s.format_type == 1).length @@ -2032,7 +2032,7 @@ guildinfo.callback = async function (msg, line) { value: ``, inline: true, }, - { + guild.emojis.length > 0 && { name: `Emotes (${guild.emojis.length})`, value: `${ guild.emojis.filter((e) => e.animated).length @@ -2043,7 +2043,7 @@ guildinfo.callback = async function (msg, line) { } unavailable`, inline: true, }, - { + guild.stickers.length > 0 && { name: `Stickers (${guild.stickers.length})`, value: `${ guild.stickers.filter((s) => s.format_type == 1).length @@ -2058,7 +2058,7 @@ guildinfo.callback = async function (msg, line) { } unavailable`, inline: true, }, - ], + ].filter((x) => !!x), footer: { text: "Fetched from guild preview", },