Update member function for role check

This commit is contained in:
Ralph 2021-04-05 11:55:18 -04:00 committed by GitHub
parent 5225287699
commit 3b21e18b16
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -8,7 +8,7 @@ let statsBotChannels = config.get('statsbot');
// Checks if user is allowed to use a command only for mods/team members // Checks if user is allowed to use a command only for mods/team members
exports.hasPerms = function(msg) { exports.hasPerms = function(msg) {
return msg.member.roles !== null && msg.member.roles.some(r => permRanks.perms.includes(r.name)); return msg.member.roles !== null && msg.member.roles.cache.some(r => permRanks.perms.includes(r.name));
}; };
// Check if command was sent in dm // Check if command was sent in dm