How can I check if I can overwrite channel permissions?

I prefer to check permissions before acting. So if I want to create a channel I check
if (categoryChannel.permissionsFor(guild.members.me).has([ PermissionsBitField.Flags.ViewChannel, PermissionsBitField.Flags.ManageChannels ], true)) {
// ok 
}

So, how can I check if I can overwrite channel permissions? In what situations might a bot not have enough perms to perform this action? What kind of bitField is needed to execute lockPermissions()?
Was this page helpful?