Deadlystrike
Deadlystrike
SIASapphire - Imagine a framework
Created by Deadlystrike on 3/8/2023 in #sapphire-support
requiredClientPermissions check always rejecting
While requiredUserPermissions: ['ManageRoles'] works great. The client check requiredClientPermissions: ['ManageRoles'] seems to always block. It is throwing not a specific missing permissions error but an I was unable to resolve my permissions in the ${commandType} command invocation channel. Unless I am doing something wrong, it looks like the problem is that the check is referencing the application id channel.permissionsFor(interaction.applicationId) when it should be referencing either the clients guild member or user ID. https://github.com/sapphiredev/framework/blob/179b21e7f74c4d9a506e1be98d7487f939ec0ae7/src/preconditions/ClientPermissions.ts#L71 When testing channel.permissionsFor(interaction.applicationId) always resolved null, where as channel.permissionsFor(interaction.client.user.id) and `channel.permissionsFor(interaction.guild.members.me) always gave a valid bitfield
"@sapphire/framework": "^4.2.0",
"discord.js": "^14.7.1",
"@sapphire/framework": "^4.2.0",
"discord.js": "^14.7.1",
37 replies