Fix coloRoles.pruneOrphanRoles()
This commit is contained in:
parent
660cf668e4
commit
84836e26c1
|
@ -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();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue