Skip to content
This repository has been archived by the owner on Aug 22, 2024. It is now read-only.

Fix: slash command options parsing #56

Closed
wants to merge 1 commit into from
Closed

Fix: slash command options parsing #56

wants to merge 1 commit into from

Conversation

vijayymmeena
Copy link
Contributor

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

### 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
Copy link
Contributor Author

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

@vijayymmeena
Copy link
Contributor Author

Closed

Reason: package is not maintained. regularly.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant