From 52a78e3e806ea64582436217de8952e80cf60f5d Mon Sep 17 00:00:00 2001 From: metal Date: Sat, 11 Mar 2023 10:56:56 +0000 Subject: [PATCH] dont show icon link if it doesnt exist Signed-off-by: GitHub --- backend/src/plugins/Utility/functions/getServerInfoEmbed.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/src/plugins/Utility/functions/getServerInfoEmbed.ts b/backend/src/plugins/Utility/functions/getServerInfoEmbed.ts index 56bf06d4..11dbb57b 100644 --- a/backend/src/plugins/Utility/functions/getServerInfoEmbed.ts +++ b/backend/src/plugins/Utility/functions/getServerInfoEmbed.ts @@ -93,7 +93,9 @@ export async function getServerInfoEmbed( embed.description = `${preEmbedPadding}**Basic Information**\n${basicInformation.join("\n")}`; // IMAGE LINKS - const iconUrl = `[Link](${(restGuild || guildPreview)!.iconURL({ dynamic: true, format: "png", size: 2048 })})`; + const iconUrl = (restGuild || guildPreview)!.icon + ? `[Link](${(restGuild || guildPreview)!.iconURL({ dynamic: true, format: "png", size: 2048 })})` + : "None"; const bannerUrl = restGuild?.banner ? `[Link](${restGuild.bannerURL({ format: "png", size: 2048 })})` : "None"; const splashUrl = (restGuild || guildPreview)!.splash ? `[Link](${(restGuild || guildPreview)!.splashURL({ format: "png", size: 2048 })})`