mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-14 18:43:31 +01:00
refactor: remove obsolete builder methods (#7590)
This commit is contained in:
@@ -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();
|
||||
```
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user