From b0a61ec89913ed35c0364c06b43264814d2951cc Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Mon, 22 Aug 2022 08:11:41 -0400 Subject: add privacy policy to help command and links command --- src/commands/info/help.ts | 12 ++++++------ src/commands/info/links.ts | 4 ++++ 2 files changed, 10 insertions(+), 6 deletions(-) (limited to 'src/commands') diff --git a/src/commands/info/help.ts b/src/commands/info/help.ts index df18403..70c8f20 100644 --- a/src/commands/info/help.ts +++ b/src/commands/info/help.ts @@ -213,20 +213,20 @@ export default class HelpCommand extends BushCommand { const row = new ActionRowBuilder(); const config = this.client.config; - if (!config.isDevelopment && !this.client.guilds.cache.some((guild) => guild.ownerId === message.author.id)) { + if (!config.isDevelopment || message.author.isOwner()) { row.addComponents(new ButtonBuilder({ style: ButtonStyle.Link, label: 'Invite Me', url: invite(this.client) })); } - if ( - config.supportGuild.id && - config.supportGuild.invite && - !this.client.guilds.cache.get(config.supportGuild.id)?.members.cache.has(message.author.id) - ) { + if (config.supportGuild.id && config.supportGuild.invite) { row.addComponents(new ButtonBuilder({ style: ButtonStyle.Link, label: 'Support Server', url: config.supportGuild.invite })); } if (packageDotJSON?.repository) row.addComponents(new ButtonBuilder({ style: ButtonStyle.Link, label: 'GitHub', url: packageDotJSON.repository })); else void message.channel?.send('Error importing package.json, please report this to my developer.'); + row.addComponents( + new ButtonBuilder({ style: ButtonStyle.Link, label: 'Privacy Policy', url: 'https://privacy.tanzanite.dev' }) + ); + return row; } diff --git a/src/commands/info/links.ts b/src/commands/info/links.ts index 3dbdbef..8003c65 100644 --- a/src/commands/info/links.ts +++ b/src/commands/info/links.ts @@ -31,6 +31,10 @@ export default class LinksCommand extends BushCommand { } buttonRow.addComponents(new ButtonBuilder({ style: ButtonStyle.Link, label: 'GitHub', url: packageDotJSON.repository })); + + buttonRow.addComponents( + new ButtonBuilder({ style: ButtonStyle.Link, label: 'Privacy Policy', url: 'https://privacy.tanzanite.dev' }) + ); return await message.util.reply({ content: 'Here are some useful links:', components: [buttonRow] }); } } -- cgit