discordjs / builders

A collection of builders that you can use when creating your bot.
Apache License 2.0
97 stars 37 forks source link

Slash commands NumberOption support missing #24

Closed abbyjng closed 3 years ago

abbyjng commented 3 years ago

Please describe the problem you are having in as much detail as possible: According to the documentation, there should be a way to create a number option on slash commands via the SlashCommandBuilder() (see here and here). However, when attempting to use .addNumberOption, this error is thrown:

.addNumberOption(option =>
^
TypeError: (intermediate value).setName(...).setDescription(...).addNumberOption is not a function

Upon going into the files for discord.js, there does not seem to be any support for number options within @discordjs/builders/dist/interactions/slashCommands/options.

Include a reproducible code sample here, if possible:

new SlashCommandBuilder()
    .setName('cmdname')
    .setDescription('command description')
    .addNumberOption(option =>
        option.setName('value')
            .setDescription('the value')
            .setRequired(true))

Further details:

Relevant client options:

iCrawl commented 3 years ago

Duplicate of #22