3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-25 10:25:01 +00:00

dont show icon link if it doesnt exist

Signed-off-by: GitHub <noreply@github.com>
This commit is contained in:
metal 2023-03-11 10:56:56 +00:00 committed by GitHub
parent 564b0ba516
commit 52a78e3e80
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 })})`