Button Permissions #3344
Unanswered
sm0lvoicc
asked this question in
API Feature Requests & Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
welp, like the buttons have the
disabled
property, a new propertyallowed
can be introducedWhy This is Needed
it is needed because there are many commands in which the person who used the slash command or triggered the normal text message only should be able to use the button, for now people have been filtering them using either JSON.stringigying the id of the user who used the command into the custom id and then filtering them out and then replying them with a
flags: 64
and atype: 4
telling them to not use the button or it cannot be used by them, this thing required extra piece of codes which slows down the command response by a small time, sometimes it results into the interaction failing, or they just do a type 6, which is again uselessINTERACTION_CREATE
event receiving, so why not make the payload look something likeso with this you can set it per action row, and the
disabled
property will override theallowed
one, so like you can setallowed
for a few users, but if you want a specific button to be usable by everyone, you can setdisabled: false
, so if you setallowed
, disabled will automatically be false, but you can override it with thedisabled
, i hope you get what i meanAlternatives Considered
maybe a role permission to use the components?
Beta Was this translation helpful? Give feedback.
All reactions