owengombas / discord.ts

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

Fix: slash command options parsing #56

Closed vijayymmeena closed 3 years ago

vijayymmeena commented 3 years ago

Issue

  1. create a slash command with two optional options, example: /test option_a option_b
  2. now on discord use this command as /test option_b: 123 (here we are using option_b only and leaving option_a blank)
  3. when discord.ts try to execute the original command, parameter passed are [123, undefined] (which is the issue, because it was suppose to [undefined, 123])

Fix

I have looked at the code, I think, this suggested approach is more appropriate.

Thanks

vijayymmeena commented 3 years ago

group command (sub command) and slash command are tested with this update.

vijayymmeena commented 3 years ago

Closed

Reason: package is not maintained. regularly.