refactor: remove obsolete builder methods (#7590)

This commit is contained in:
Almeida
2022-03-06 15:27:17 +00:00
committed by GitHub
parent 79d6c0489c
commit 10607dbdaf
7 changed files with 83 additions and 116 deletions

View File

@@ -33,13 +33,7 @@ const boopCommand = new SlashCommandBuilder()
option
.setName('boop_reminder')
.setDescription('How often should we remind you to boop the user')
.addChoice('Every day', 1)
.addChoice('Weekly', 7)
// Or, if you prefer adding more choices at once, you can use an array
.addChoices([
['Every three months', 90],
['Yearly', 365],
]),
.addChoices({ name: 'Every day', value: 1 }, { name: 'Weekly', value: 7 }),
);
// Get the final raw data that can be sent to Discord
@@ -71,11 +65,11 @@ const pointsCommand = new SlashCommandBuilder()
option
.setName('action')
.setDescription('What action should be taken with the users points?')
.addChoices([
['Add points', 'add'],
['Remove points', 'remove'],
['Reset points', 'reset'],
])
.addChoices(
{ name: 'Add points', value: 'add' },
{ name: 'Remove points', value: 'remove' },
{ name: 'Reset points', value: 'reset' },
)
.setRequired(true),
)
.addIntegerOption((option) => option.setName('points').setDescription('Points to add or remove')),
@@ -102,4 +96,4 @@ const pointsCommand = new SlashCommandBuilder()
// Get the final raw data that can be sent to Discord
const rawData = pointsCommand.toJSON();
```
```