aboutsummaryrefslogtreecommitdiff
path: root/src/commands/dev
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/dev
parent973bbebfd0a47b0b36d19fccf6a882e971beaaa5 (diff)
downloadtanzanite-b5ada8dca12013bfc730a50f4e8808d61bce23ba.tar.gz
tanzanite-b5ada8dca12013bfc730a50f4e8808d61bce23ba.tar.bz2
tanzanite-b5ada8dca12013bfc730a50f4e8808d61bce23ba.zip
fix(FeaturesCommand): properly hide disabled features
Diffstat (limited to 'src/commands/dev')
-rw-r--r--src/commands/dev/test.ts18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/commands/dev/test.ts b/src/commands/dev/test.ts
index 7bab0a1..8c76ded 100644
--- a/src/commands/dev/test.ts
+++ b/src/commands/dev/test.ts
@@ -54,11 +54,11 @@ export default class TestCommand extends BushCommand {
if (['button', 'buttons'].includes(args?.feature?.toLowerCase())) {
const ButtonRow = new ActionRow().addComponents(
- new ButtonComponent().setStyle(ButtonStyle.Primary).setCustomId('primaryButton').setLabel('Primary'),
- new ButtonComponent().setStyle(ButtonStyle.Secondary).setCustomId('secondaryButton').setLabel('Secondary'),
- new ButtonComponent().setStyle(ButtonStyle.Success).setCustomId('successButton').setLabel('Success'),
- new ButtonComponent().setStyle(ButtonStyle.Danger).setCustomId('dangerButton').setLabel('Danger'),
- new ButtonComponent().setStyle(ButtonStyle.Link).setLabel('Link').setURL('https://www.youtube.com/watch?v=dQw4w9WgXcQ')
+ new ButtonComponent({ style: ButtonStyle.Primary, customId: 'primaryButton', label: 'Primary' }),
+ new ButtonComponent({ style: ButtonStyle.Secondary, customId: 'secondaryButton', label: 'Secondary' }),
+ new ButtonComponent({ style: ButtonStyle.Success, customId: 'successButton', label: 'Success' }),
+ new ButtonComponent({ style: ButtonStyle.Danger, customId: 'dangerButton', label: 'Danger' }),
+ new ButtonComponent({ style: ButtonStyle.Link, label: 'Link', url: 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' })
);
return await message.util.reply({ content: 'buttons', components: [ButtonRow] });
} else if (['embed', 'button embed'].includes(args?.feature?.toLowerCase())) {
@@ -77,7 +77,7 @@ export default class TestCommand extends BushCommand {
.setTitle('Title');
const buttonRow = new ActionRow().addComponents(
- new ButtonComponent().setStyle(ButtonStyle.Link).setLabel('Link').setURL('https://google.com/')
+ new ButtonComponent({ style: ButtonStyle.Link, label: 'Link', url: 'https://google.com/' })
);
return await message.util.reply({ content: 'Test', embeds: [embed], components: [buttonRow] });
} else if (['lots of buttons'].includes(args?.feature?.toLowerCase())) {
@@ -86,7 +86,7 @@ export default class TestCommand extends BushCommand {
const row = new ActionRow();
for (let b = 1; b <= 5; b++) {
const id = (a + 5 * (b - 1)).toString();
- const button = new ButtonComponent().setStyle(ButtonStyle.Primary).setCustomId(id).setLabel(id);
+ const button = new ButtonComponent({ style: ButtonStyle.Primary, customId: id, label: id });
row.addComponents(button);
}
ButtonRows.push(row);
@@ -118,7 +118,7 @@ export default class TestCommand extends BushCommand {
const row = new ActionRow();
for (let b = 1; b <= 5; b++) {
const id = (a + 5 * (b - 1)).toString();
- const button = new ButtonComponent().setStyle(ButtonStyle.Secondary).setCustomId(id).setLabel(id);
+ const button = new ButtonComponent({ style: ButtonStyle.Secondary, customId: id, label: id });
row.addComponents(button);
}
ButtonRows.push(row);
@@ -151,7 +151,7 @@ export default class TestCommand extends BushCommand {
content: 'Click for modal',
components: [
new ActionRow().addComponents(
- new ButtonComponent().setStyle(ButtonStyle.Primary).setLabel('Modal').setCustomId('test;modal')
+ new ButtonComponent({ style: ButtonStyle.Primary, label: 'Modal', customId: 'test;modal' })
)
]
});