Deadlystrike
Deadlystrike
SIASapphire - Imagine a Framework
Created by Deadlystrike on 4/20/2025 in #sapphire-support
client permissions failing to resolve in channel
I just upgraded from: DiscordJS 14.8.0 > 14.18.0 Sapphire 4.2.2 > 5.3.3 I am running into an issue where any command that has requiredClientPermissions specified simply outputs:
I was unable to resolve my permissions in the chat input command invocation channel.
We ran into this issue a long ways back here: https://discord.com/channels/737141877803057244/1083064722355650641/1083169340259581973 which turned out to be a bug due to the age of our application. I am thinking this might be a regression in 5.x.x . Sample command constructor with issue:
constructor(context, options) {
super(context, {
...options,
requiredClientPermissions: [PermissionFlagsBits.EmbedLinks],
});
}
constructor(context, options) {
super(context, {
...options,
requiredClientPermissions: [PermissionFlagsBits.EmbedLinks],
});
}
12 replies
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