Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow users select type of slash command arguments #65

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

karelkryda
Copy link
Contributor

This will allow users specify slash command params like this

expectedArgs: [
        {
            "type": 8,
            "name": "role",
            "description": "user role",
            "required": "true"
        },
        {
            "type": 6,
            "name": "user",
            "description": "specify user",
            "required": "false"
        }
    ],

This will allow users specify slash command params like this
```
expectedArgs: [
        {
            "type": 8,
            "name": "role",
            "description": "user role",
            "required": "true"
        },
        {
            "type": 6,
            "name": "user",
            "description": "specify user",
            "required": "false"
        }
    ],
```
@karelkryda
Copy link
Contributor Author

Also check this PR #66

Copy link

@theo-bnts theo-bnts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be very convenient and works great, however, I suggest keeping the 2 methods (testing typeof of expectedArgs) so as not to annoy those who only use a prefix (or else, one should modify the documentation and add a type checking system for basic commands)

@karelkryda
Copy link
Contributor Author

@theo-bnts better?

@Shadowsniper784
Copy link

Or you could add a option parameter for slash commands that overrides expectedArgs

@karelkryda
Copy link
Contributor Author

Or you could add a option parameter for slash commands that overrides expectedArgs

First of all, I apologize for the late response.

Personally, I think this is the easiest way to implement it. But if you insist on adding an argument, I'll do it.

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

Successfully merging this pull request may close these issues.

4 participants