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 toolkit7mo 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
probablyraging7mo ago
You can check if the channel overwrite allows or denies specific permissions
d.js docs
d.js docs7mo ago
Documentation suggestion for @ddt:property BaseGuildTextChannel#permissionOverwrites A manager of permission overwrites that belong to this channel
ddt
ddt7mo ago
in .has() ?
probablyraging
probablyraging7mo ago
Yes
ddt
ddt7mo ago
Always true if the role has an administrator
ddt
ddt7mo ago
what is second parameter?
No description
probablyraging
probablyraging7mo 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