4.7.1 remove @deleted-roles on view
This commit is contained in:
2 files changed
+14
-12
No files matched your search
@@ -43,18 +43,6 @@ module.exports = {
|
||||
description = '> There are no factions that have claimed armbands.';
|
||||
} else {
|
||||
for (const [factionID, data] of Object.entries(GuildDB.factionArmbands)) {
|
||||
const guild = client.guilds.cache.get(GuildDB.serverID);
|
||||
const role = guild.roles.cache.find(role => role.id == factionID);
|
||||
if (!role) {
|
||||
let query = {
|
||||
$pull: { 'server.usedArmbands': data.armband },
|
||||
$unset: { [`server.factionArmbands.${factionID}`]: "" },
|
||||
};
|
||||
client.dbo.collection("guilds").updateOne({'server.serverID': GuildDB.serverID}, query, function (err, res) {
|
||||
if (err) return client.sendInternalError(interaction, err);
|
||||
});
|
||||
continue;
|
||||
}
|
||||
if (description == "") description += `> <@&${factionID}> - ${data.armband}`;
|
||||
else description += `\n> <@&${factionID}> - *${data.armband}*`;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user