owengombas / discord.ts

🤖 Create your discord bot by using TypeScript and decorators!
https://owencalvin.github.io/discord.ts/
325 stars 40 forks source link

Can't use @Option as a required option #59

Closed zLupa closed 2 years ago

zLupa commented 3 years ago

I'm trying to create a required option in a Slash Command, but it shows as a non-required option for some reason.

How to reproduce:

@Discord()
@Guild("<redacted>")
@Group("test", "Testing command sub-groups with options")
export default abstract class TestCommand {
  @Slash("brega", { description: "test sub-command" })
  async runCommand(
    @Option("randomOption", "STRING", {
      description: "This option is required.",
      required: true,
    })
    categoryTicketID: string,

    interaction: CommandInteraction
  ) {
    interaction.reply("Certa noite em campo grande.");
  }
}

The slash command is created and the option appears, but not as a required option. No errors are showing in logs.