Skip to content

Allow users select type of slash command arguments#65

Open
karelkryda wants to merge 3 commits into
AlexzanderFlores:mainfrom
karelkryda:patch-1
Open

Allow users select type of slash command arguments#65
karelkryda wants to merge 3 commits into
AlexzanderFlores:mainfrom
karelkryda:patch-1

Conversation

@karelkryda

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

Also check this PR #66

@theo-bnts theo-bnts left a comment

Copy link
Copy Markdown

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
Copy Markdown
Contributor Author

@theo-bnts better?

@Shadowsniper784

Copy link
Copy Markdown

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

@karelkryda

Copy link
Copy Markdown
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