Skip to content
This repository has been archived by the owner on Oct 12, 2024. It is now read-only.

Commit

Permalink
Fix vanity url field in ServerInfo to be a link
Browse files Browse the repository at this point in the history
  • Loading branch information
RadiatedExodus committed Feb 8, 2024
1 parent 25d515c commit a464700
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/commands/Info/ServerInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const Command: MeteoriumCommand = {
.setDescription(Guild.description != "" ? Guild.description : null)
.setThumbnail(Guild.iconURL({ extension: "png", size: 1024 }))
.setImage(Guild.bannerURL({ extension: "png" }))
.setURL("https://discord.com")
.setURL(Guild.vanityURLCode ? `https://discord.gg/${Guild.vanityURLCode}` : "https://discord.com")
.addFields([
{ name: "Server id", value: Guild.id },
{
Expand All @@ -53,7 +53,10 @@ export const Command: MeteoriumCommand = {
{ name: "Server boost tier", value: Guild.premiumTier ? Guild.premiumTier.toString() : "N/A" },
{ name: "Partner server", value: Guild.partnered ? "Yes" : "No" },
{ name: "Verified server", value: Guild.verified ? "Yes" : "No" },
{ name: "Vanity URL", value: Guild.vanityURLCode ? Guild.vanityURLCode : "N/A" },
{
name: "Vanity URL",
value: Guild.vanityURLCode ? `https://discord.gg/${Guild.vanityURLCode}` : "N/A",
},
{ name: "Recorded punishments/cases", value: TotalModCases.toString() },
{
name: "Ban appeal link",
Expand All @@ -62,7 +65,7 @@ export const Command: MeteoriumCommand = {
]);

const SplashDiscoveryUrl = new MeteoriumEmbedBuilder()
.setURL("https://discord.com")
.setURL(Guild.vanityURLCode ? `https://discord.gg/${Guild.vanityURLCode}` : "https://discord.com")
.setImage(Guild.discoverySplashURL({ extension: "png" }));

return await interaction.editReply({ embeds: [MainEmbed, SplashDiscoveryUrl] });
Expand Down

0 comments on commit a464700

Please sign in to comment.