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:
Solution:Jump to solution
GitHub
fix(ClientPermissions): resolve client permissions for older applic...
In a likely regression of: #616 setting requiredClientPermissions in commands is resulting in consistent fallback messages of:
I was unable to resolve my permissions in the chat input command invo...
7 Replies
Have you also checked all your other dependencies? In particular other sapphire dependencies and discord-api-types? I can guarantee you that EmbedLinks through requiredClientPermissions is not bugged because @Dragonite uses that as well
Everything should be up-to-date, I went scorched earth on it. Deleted my lock and
node_modules
ran npm-check-updates
and forced all to latest and re-ran npm i
Digging deeper in the ClientPermissions.cjs
is what is evaluating, and its returning nullAssuming this is a regression in https://github.com/sapphiredev/framework/pull/616/files
I patched in
Resulting in:
and no more error.
hm well if you can form it into a pr then submit it I'd say
that said, that PR was already in 4.2.1
I'll get that started now.
Yeah, this was an issue I ran into when switching from our custom commando-fork to saphire which was on 4.2.0 at the time, Vlad snipped that bug so fast and issued 4.2.1 which has served us well for almost 2 years. It looks like the fix got removed a bit over a year later during some refactoring and updates.
Solution
GitHub
fix(ClientPermissions): resolve client permissions for older applic...
In a likely regression of: #616 setting requiredClientPermissions in commands is resulting in consistent fallback messages of:
I was unable to resolve my permissions in the chat input command invo...
linting is failing @Deadlystrike