Add interaction response that clears select menus #5896
Unanswered
MinnDevelopment
asked this question in
API Feature Requests & Ideas
Replies: 1 comment
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
A very commonly requested feature is to clear the selections people make when using select menus. Right now, the preferred way to clear these selections, is to edit the message components.
However, this causes some problems. When the components of a message are edited (even without changing anything) the menu clears for everyone who can see the message. This is a very bad user-experience, since it also clears the current drafted selections of users who haven't submitted anything yet.
Due to these issues, I'm asking for a feature which would allow clearing these selections properly on interaction replies. This would allow clearing them only for the user who just submitted something, rather than everyone who can see it.
This could be achieved using a flag on the update message callback type. For example:
This may not be the ideal way to achieve it, though. Feel free to offer better suggestions, I'm just trying to bring attention to the issue.
I've also considered a possible alternative approach that would involve new flags on the menu components themselves, indicating "clear on submit". However, I believe this might be less useful since you might not want to clear the selection on erroneous inputs, for example invalid roles, and instead allow users to edit their current selection again before submitting.
Lastly, I think clearing menus on no-change updates is a footgun that should be resolved. People might erroneously update messages to the same structure and expect no changes to occur, but instead will cause these issues without even being aware of the problem. Patching a message to the exact same values should ideally not cause any disruptions for users, or at the very least this should be explicitly documented (to my knowledge it isn't right now).
Beta Was this translation helpful? Give feedback.
All reactions