401 error when editing command permission

Hey, when I tried to use bot's token to set command permission, I get 401 error. Am I missing any permission scopes?
guild.commands.permissions.set({
            command: "CmDID",
            token: config['botToken'],
            permissions: commandPermConfig,
})
Was this page helpful?