[Suggestion] Characters required in slash commands options
Hey, I'm Mampo, a Discord bots developer. I've been developing bots since 2 years and I recently rencounter an “issue” which lead me to this suggestion.
Add a required amount of characters or a limited amount of characters in slash options. This feature would basically work like the numbers option. In the code, you can set so a minimum amount of characters is needed, and, you can also set a maximum character limit. Here is a quick example of how it can works.
Command:
/example
Option:
[text]
Command Format:
/example [text]
Example 1, context: The option requires at least 3 characters. This requirement is respected.
What the user is typing:
/example [text:Hello]
Result:
Bot says: Hello
Example 2, context: The option requires at least 3 characters. This requirement is not respected.
What the user is typing:
/example [text:He]
Result:
The command is not sending. It warns the member that he needs to put more than 3 characters in his option.
Here was my example which most of who probably won't understand because it's so bad. To conclude this suggestion, adding a character limit or a required amount of characters in slash options would be awesome for developers. It's basically same as the number option, where the developer can set a maximum number or/and a minimum number.
-
It's already possible, use
min_length
andmax_length
.You can have more information here:
1 -
My explanation is a bit miserable, I'm sorry for that.
0
請登入寫評論。
評論
3 條評論