AlexzanderFlores / WOKCommands

130 stars 60 forks source link

hasPermission shorthand is no longer existent in discord.js v13 #115

Open ex0tiq opened 3 years ago

ex0tiq commented 3 years ago

As I wanted to make my bot usable in the new stage channels, I updated discord.js to the dev preview of v13. Because of that I found out that many of my permission checks did not work anymore. In the upcoming v13 release of discord.js the shorthand x.hasPermission(y) has been removed from roles and guild members. TypeError: _a.hasPermission is not a function

It is now required to check for a permission in the permissions collection of the objects x.permissions.has(y)

To make this awesome module compatible with the upcoming release it would be awesome if this could be implemented here.

Source: Preview of discord.js guide - https://deploy-preview-551--discordjs-guide.netlify.app/additional-info/changes-in-v13.html#guildmember-haspermission

tippfehlr commented 2 years ago

As discord.js v13.8 is out, is this still a problem?