diff options
Diffstat (limited to 'src/commands/info/links.ts')
-rw-r--r-- | src/commands/info/links.ts | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/commands/info/links.ts b/src/commands/info/links.ts index 3671c6c..3c7add2 100644 --- a/src/commands/info/links.ts +++ b/src/commands/info/links.ts @@ -24,10 +24,13 @@ export default class LinksCommand extends BushCommand { if (!this.client.config.isDevelopment || message.author.isOwner()) { buttonRow.addComponents(new ButtonBuilder({ style: ButtonStyle.Link, label: 'Invite Me', url: invite(this.client) })); } - buttonRow.addComponents( - new ButtonBuilder({ style: ButtonStyle.Link, label: 'Support Server', url: this.client.config.supportGuild.invite }), - new ButtonBuilder({ style: ButtonStyle.Link, label: 'GitHub', url: packageDotJSON.repository }) - ); + const supportInvite = this.client.config.supportGuild.invite; + + if (supportInvite) { + buttonRow.addComponents(new ButtonBuilder({ style: ButtonStyle.Link, label: 'Support Server', url: supportInvite })); + } + + buttonRow.addComponents(new ButtonBuilder({ style: ButtonStyle.Link, label: 'GitHub', url: packageDotJSON.repository })); return await message.util.reply({ content: 'Here are some useful links:', components: [buttonRow] }); } } |