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

Add image links to server info embed

This commit is contained in:
Dark 2021-02-01 06:04:50 +01:00
parent 6f545f5c4a
commit 69b58ed34f
No known key found for this signature in database
GPG key ID: 384C4B4F5B1E25A8

View file

@ -80,6 +80,32 @@ export async function getServerInfoEmbed(
value: basicInformation.join("\n"), value: basicInformation.join("\n"),
}); });
// IMAGE LINKS
const iconUrl = `[URL](${(restGuild || guildPreview)!.iconURL})`;
const bannerUrl = restGuild?.bannerURL ?? "Unavailable";
const splashUrl =
(restGuild || guildPreview)!.splashURL != null
? `[URL](${(restGuild || guildPreview)!.splashURL?.replace("size=128", "size=2048")})`
: "None";
embed.fields.push(
{
name: "Server icon",
value: iconUrl,
inline: true,
},
{
name: "Invite splash",
value: splashUrl,
inline: true,
},
{
name: "Server banner",
value: bannerUrl,
inline: true,
},
);
// MEMBER COUNTS // MEMBER COUNTS
const totalMembers = const totalMembers =
guildPreview?.approximateMemberCount || guildPreview?.approximateMemberCount ||