3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-25 18:25:03 +00:00
Signed-off-by: GitHub <noreply@github.com>
This commit is contained in:
metal 2023-03-11 10:48:57 +00:00 committed by GitHub
parent 801cd2630b
commit 564b0ba516
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -26,6 +26,12 @@ const PremiumTiers: Record<PremiumTier, number> = {
TIER_3: 3,
};
const prettifyFeature = (feature: string): string =>
`\`${feature
.split("_")
.map((e) => `${e.substring(0, 1).toUpperCase()}${e.substring(1).toLowerCase()}`)
.join(" ")}\``;
export async function getServerInfoEmbed(
pluginData: GuildPluginData<UtilityPluginType>,
serverId: string,
@ -81,13 +87,10 @@ export async function getServerInfoEmbed(
}
if (features.length > 0) {
basicInformation.push(`Features: ${features.join(", ")}`);
basicInformation.push(`Features: ${features.map(prettifyFeature).join(", ")}`);
}
embed.fields.push({
name: preEmbedPadding + "Basic information",
value: basicInformation.join("\n"),
});
embed.description = `${preEmbedPadding}**Basic Information**\n${basicInformation.join("\n")}`;
// IMAGE LINKS
const iconUrl = `[Link](${(restGuild || guildPreview)!.iconURL({ dynamic: true, format: "png", size: 2048 })})`;