Getting 'Missing Access' error when deleting channel even with ManageChannels permission

Hey, I am rather stumped with this one and thought this would be the best place to ask for help. I am trying to delete a voice channel inside a category, the category has a permission override to give the bot the 'ManageChannels' permission, it is able to create channels in that category but doesn't seem to be able to delete them?? Relevant code:
// debug
const me = discordChannel.guild.members.me
console.log(discordChannel.parentId, ChannelType[discordChannel.type], discordChannel.permissionsFor(me!).toArray())

// delete channel:
await discordChannel.delete("Deleting voice channels associated to event channel")
// debug
const me = discordChannel.guild.members.me
console.log(discordChannel.parentId, ChannelType[discordChannel.type], discordChannel.permissionsFor(me!).toArray())

// delete channel:
await discordChannel.delete("Deleting voice channels associated to event channel")
Find debug log and error attached
No description
No description
8 Replies
d.js toolkit
d.js toolkit3mo 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!
SyntheticDev
SyntheticDev3mo ago
Node version: v20.8.1 If a wider range of the code would be helpful then let me know! (fyi: can confirm that category id and channel id match)
mallusrgreat
mallusrgreat3mo ago
I don't think I see a view channel permission on that array..
SyntheticDev
SyntheticDev3mo ago
Just tried it with view channel, doesn't make a difference
No description
NyR
NyR3mo ago
I don't see permissions to 'Connect' Discord uses Implicit Permissions
d.js docs
d.js docs3mo ago
Suggestion for @SyntheticDev: :guide: Popular Topics: Permissions (extended) - Implicit permissions read more
NyR
NyR3mo ago
It doesn't have permission to connect, therefore it can't manage it It's the same as ViewChannel for Text based channels
mallusrgreat
mallusrgreat3mo ago
oh i didnt notice it was a voice channel