mirror of
https://github.com/arthur-pbty/bot-discord-coins.git
synced 2026-06-03 23:36:29 +02:00
corrige perm bug
This commit is contained in:
@@ -14,6 +14,11 @@ module.exports = async function getPermissionLevel(serverId, user) {
|
||||
);
|
||||
});
|
||||
|
||||
const highestPermission = Math.max(...perms.map((perm) => perm.permission));
|
||||
let highestPermission;
|
||||
if (perms.length === 0) {
|
||||
highestPermission = 0
|
||||
} else {
|
||||
highestPermission = Math.max(...perms.map((perm) => perm.permission));
|
||||
}
|
||||
return highestPermission;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user