aboutsummaryrefslogtreecommitdiff
path: root/src/commands/info
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-02-27 21:42:06 -0500
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-02-27 21:42:06 -0500
commitb5ada8dca12013bfc730a50f4e8808d61bce23ba (patch)
tree721f5c0f3068a7f98b30e257b3d58b2713f2f9bf /src/commands/info
parent973bbebfd0a47b0b36d19fccf6a882e971beaaa5 (diff)
downloadtanzanite-b5ada8dca12013bfc730a50f4e8808d61bce23ba.tar.gz
tanzanite-b5ada8dca12013bfc730a50f4e8808d61bce23ba.tar.bz2
tanzanite-b5ada8dca12013bfc730a50f4e8808d61bce23ba.zip
fix(FeaturesCommand): properly hide disabled features
Diffstat (limited to 'src/commands/info')
-rw-r--r--src/commands/info/help.ts6
-rw-r--r--src/commands/info/links.ts6
2 files changed, 6 insertions, 6 deletions
diff --git a/src/commands/info/help.ts b/src/commands/info/help.ts
index 2383566..15c447a 100644
--- a/src/commands/info/help.ts
+++ b/src/commands/info/help.ts
@@ -143,15 +143,15 @@ export default class HelpCommand extends BushCommand {
const row = new ActionRow();
if (!client.config.isDevelopment && !client.guilds.cache.some((guild) => guild.ownerId === message.author.id)) {
- row.addComponents(new ButtonComponent().setStyle(ButtonStyle.Link).setLabel('Invite Me').setURL(util.invite));
+ row.addComponents(new ButtonComponent({ style: ButtonStyle.Link, label: 'Invite Me', url: util.invite }));
}
if (!client.guilds.cache.get(client.config.supportGuild.id)?.members.cache.has(message.author.id)) {
row.addComponents(
- new ButtonComponent().setStyle(ButtonStyle.Link).setLabel('Support Server').setURL(client.config.supportGuild.invite)
+ new ButtonComponent({ style: ButtonStyle.Link, label: 'Support Server', url: client.config.supportGuild.invite })
);
}
if (packageDotJSON?.repository)
- row.addComponents(new ButtonComponent().setStyle(ButtonStyle.Link).setLabel('GitHub').setURL(packageDotJSON.repository));
+ row.addComponents(new ButtonComponent({ style: ButtonStyle.Link, label: 'GitHub', url: packageDotJSON.repository }));
else void message.channel?.send('Error importing package.json, please report this to my developer.');
return row;
diff --git a/src/commands/info/links.ts b/src/commands/info/links.ts
index d91f1e7..e14195e 100644
--- a/src/commands/info/links.ts
+++ b/src/commands/info/links.ts
@@ -22,11 +22,11 @@ export default class LinksCommand extends BushCommand {
public override async exec(message: BushMessage | BushSlashMessage) {
const buttonRow = new ActionRow();
if (!client.config.isDevelopment || message.author.isOwner()) {
- buttonRow.addComponents(new ButtonComponent().setStyle(ButtonStyle.Link).setLabel('Invite Me').setURL(util.invite));
+ buttonRow.addComponents(new ButtonComponent({ style: ButtonStyle.Link, label: 'Invite Me', url: util.invite }));
}
buttonRow.addComponents(
- new ButtonComponent().setStyle(ButtonStyle.Link).setLabel('Support Server').setURL(client.config.supportGuild.invite),
- new ButtonComponent().setStyle(ButtonStyle.Link).setLabel('GitHub').setURL(packageDotJSON.repository)
+ new ButtonComponent({ style: ButtonStyle.Link, label: 'Support Server', url: client.config.supportGuild.invite }),
+ new ButtonComponent({ style: ButtonStyle.Link, label: 'GitHub', url: packageDotJSON.repository })
);
return await message.util.reply({ content: 'Here are some useful links:', components: [buttonRow] });
}