Fix coloRoles.pruneOrphanRoles()

This commit is contained in:
Lamp 2018-09-01 12:18:25 -07:00 committed by GitHub
parent 660cf668e4
commit 84836e26c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -74,7 +74,7 @@ colorRoles.pruneOrphanRoles = async function() { // delete all color roles that
var guild = dClient.defaultGuild || dClient.guilds.get(config.guildID); var guild = dClient.defaultGuild || dClient.guilds.get(config.guildID);
for (let role of guild.roles) { for (let role of guild.roles) {
role = role[1]; role = role[1];
if (role.name.startsWith('[') && role.members.length == 0) if (role.name.startsWith('[') && !role.members.size)
await role.delete(); await role.delete();
} }
}; };