Client Permissions
When using the client permission tag from applyOption it always passes as true even if the bot doesnt have the permission
Solution:Jump to solution
Previously, obtaining permissions for new applications did not work due to this check:
Because permissions have always had the value of
this.dmChannelPermissions
(for new applications), in fix, I removed this check...GitHub
framework/src/preconditions/ClientPermissions.ts at ed6d54784a79010...
Discord bot framework built on top of discord.js for advanced and amazing bots. - sapphiredev/framework
12 Replies
Does the bot have admin permissions?
No
I tested it with every permission, always passed as true
@Helpers
I already wrote about this before https://discord.com/channels/737141877803057244/1153055851326750760
Oh I saw that post at the time but I find it extremely bizarre how that would be related because
1. It fixes a bug for other applications
2. I would have no idea how to change the code to not break it for old applications again
Definitly open to PRs. You / @Juyyus can use Node debugging tools to analyze the steps in the JS file in node_modules
@Developers please review
i dont see why or how that PR fixes it
🥴
@DemonWayne can you walk me through?
Solution
Previously, obtaining permissions for new applications did not work due to this check:
Because permissions have always had the value of
this.dmChannelPermissions
(for new applications), in fix, I removed this checkGitHub
framework/src/preconditions/ClientPermissions.ts at ed6d54784a79010...
Discord bot framework built on top of discord.js for advanced and amazing bots. - sapphiredev/framework
fun
Nice catch
can you check if theres any other preconditions doing this? <:Dog_Cheems_Pray:734013324244680734>
Released v.4.6.1 which includes the PR above @Juyyus @DemonWayne