-
-
Notifications
You must be signed in to change notification settings - Fork 93
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
Can't edit messages to remove all components. #232
Comments
The minimal fix for my bot was to add |
I wonder what a vector with one nullptr does. I might make that represent the empty array value. |
I tried a vector with an empty action bar and that was an invalid request, I'm not sure if Edit: I see what you mean, that'd probably work for this case if handled to just produce an empty array in the serializer. |
This issue extends to more than just components. You can't edit a message to remove the "content" if you want to edit a message to contain just an embed (in an interaction -- but I assume it holds for the normal edit message) |
It does not seem like it's currently possible to remove all buttons from a message when handling an interaction with
createInteractionResponse()
.To remove all buttons/components you must set the
components
field to an empty array, however, if you do this it appears that the JSON serializer ignores the component field (not adding it or the empty array in the update) -- making it impossible to remove buttons.The root issue seems to be treating an empty vector as representing not present, it probably should be something like
std::optional<std::vector<Components>>
to separate the "not present" and "empty" states.The text was updated successfully, but these errors were encountered: