Channel permissions

So I have a bot that changes a bunch of people's permission for a channel. However, I am getting the following

DiscordAPIError[50013]: Missing Permissions

However the bot does have permissions (unless it's a person higher than them)

client.channels.cache.get(game.channel)?.permissionOverwrites.set([
    { id: guildId, deny: ["ViewChannel"] }, 
    ...game.players.filter(a => !game[`player_${a}`].name.startsWith("Player") && game[`player_${a}`].status === 'Alive').map(a => ({ id: a, allow: ["SendMessages", "ViewChannel", "ReadMessageHistory"], deny: ["AddReactions", "AttachFiles"] })), 
    ...game.players.filter(a => !game[`player_${a}`].name.startsWith("Player") && game[`player_${a}`].status === 'Dead').map(a => ({ id: a, allow: ["ViewChannel", "ReadMessageHistory"], deny: ["SendMessages", "AddReactions", "AttachFiles"] }) )])


Could it be because it's trying to edit someone's permission that is higher than the bot?
```
Was this page helpful?