permissions in channel

Here when checking permissions for a specific role in channel, if the role has Administrator whatever his permission is, i got true How can i got the correct permission if the role has Administrator or not
permissions = channel.permissionsFor("role_id");
if (permissions.has("ManageChannels")) {
// ..
}
permissions = channel.permissionsFor("role_id");
if (permissions.has("ManageChannels")) {
// ..
}
8 Replies
d.js toolkit
d.js toolkit13mo ago
- 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!
probablyraging
probablyraging13mo ago
You can check if the channel overwrite allows or denies specific permissions
d.js docs
d.js docs13mo ago
Documentation suggestion for @ddt:property BaseGuildTextChannel#permissionOverwrites A manager of permission overwrites that belong to this channel
ddt
ddtOP13mo ago
in .has() ?
probablyraging
probablyraging13mo ago
Yes
ddt
ddtOP13mo ago
Always true if the role has an administrator
ddt
ddtOP13mo ago
what is second parameter?
No description
probablyraging
probablyraging13mo ago
No it isn't. It will be true if the role has that overwrite in that channel Use the TextChannel#permissionOverwrites prop that I linked above
Want results from more Discord servers?
Add your server