-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Labels
Description
Description
When sending a string select menu in a message with required: true
, the API response is an error. The docs say:
The required field is only available for String Selects in modals. It is ignored in messages.
Since it is ignored in messages, I would not expect an error when setting it. This seems like either a documentation or API bug.
Steps to Reproduce
Send a message like this:
{
"components" : [ {
"components" : [ {
"custom_id" : "test.menu",
"options" : [ {
"default" : false,
"label" : "Test option",
"value" : "test-1"
} ],
"min_values" : 0,
"max_values" : 1,
"disabled" : false,
"type" : 3,
"required" : true
} ],
"type" : 1
} ],
}
Expected Behavior
Same response as without sending a required
property, a successful response.
Current Behavior
An error response with:
{
"code": 50035,
"message": "Invalid Form Body",
"errors": {
"components": {
"0": {
"components": {
"0": {
"min_values": {
"_errors": [
{
"code": "SELECT_COMPONENT_REQUIRED_ZERO_MIN_VALUES",
"message": "Select menus marked as required cannot have a min_values of 0"
}
]
}
}
}
}
}
}
}
Screenshots/Videos
No response
Client and System Information
API v10
object-Object