command.permissions.has() always returns true
When using
slashCommand.permissions.has({ permissionId: interaction.user.id })
, it seems to always return true
. Even though the user doesn't have access to that specific command.4 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 OPoh wait
ignroe that
You're right, when using await it doesn't return true anymore. But now it returns false at every command. Should the
permissionId
be the ID of a role which has permissions to the command?
Oh yeah I'm just checking whether the user has permissions to that specific command
I was trying to use this in a help command, so the user only gets to see commands he/she can use
Well that's propably going to take too much time to process, so I'll try it another way. Thank you for the help