#SlashCommandBuilder - Error at .addChoices([ ...])

4 messages · Page 1 of 1 (latest)

frail oar
#
  1. djs v14
  2. node v16
 data: new SlashCommandBuilder()
        .setName("loop")
        .setDescription("Set loop mode")
        .addIntegerOption((option) => option
            .setName("mode")
            .setDescription("Loot type (choose no 1-4)")
            .addChoices([
                ["Off", "1"],
                ["Track", "2"],
                ["Queue", "3"],
                ["AutoPlay", "4"],
            ])),

I was following EXample here : https://github.com/discordjs/builders/blob/main/docs/examples/Slash Command Builders.md
I don't think I followed wrong 🤔
help plz...........

GitHub

A collection of builders that you can use when creating your bot. - builders/Slash Command Builders.md at main · discordjs/builders

ocean ploverBOT
#

• What's your exact discord.js npm list discord.js and node node -v version?
• Post the full error stack trace, not just the top part!
• Show your code!
• Explain what exactly your issue is.
• Not a discord.js issue? Check out #useful-servers.

loud thistle
#

you are looking at an outdated example in an archived repository, refer to the pinned links in #djs-help-v14 for up to date docs / guides

frail oar
#

😭 thanks for fast replay ...