Requiring a specific role for a specific button.
So as I was in my testing phase, I created a ticket and noticed everyone could see the ticket. Can anyone have a look at this for me please, would mean a lot to me :)
9 Replies
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Not a discord.js issue? Check out #other-js-ts.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!
- ✅
Marked as resolved by staffLook at what ? share mode information 🥲
Im so sorry its my first time creating a bot i got very far but now like
Unknown User•9mo ago
Message Not Public
Sign In & Join Server To View
Hmm a quick explanation for this is, I want to make it so only one specific role can make use of the accept button but it says "you have no permissions" but still assigns the role when the member themself press accept, code will follow now.
I want the accept button to require a specific role, so it doesn't complete the output of giving the role.
Any ideas?
Here you go
Here's also the code where it gives the role
Wth, i just noticed anyone can do ANYTHING
every slash command
if you need any more handlers or events let me know
@TAEMBO.md sorry for the ping 😅
So I did what you said, it is not giving the role indeed, instead it crashes haha.
Well, this code here is going to result in two attempted replies because you aren't
return
ing in either of those if
statements, so even if both of them pass, it's going to continue to the reply()
at the bottom of your command logicim really not getting it to work..
It says, "you do not have the specified role to do this"
@TAEMBO.md 😅
i put it all back before i mess it up even more but maybe you would want to place it in the right spot
Hey I solved it after trying for so long :) thanks now i understand :))