From c9d3a2efba41057e485cb65ce90e6381dffbbd95 Mon Sep 17 00:00:00 2001 From: Abheek Dhawan Date: Sun, 4 Apr 2021 00:17:06 -0500 Subject: [PATCH] Remove role update permissions logging temporarily due to errors --- index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index 7e5e2ef..d82da03 100644 --- a/index.js +++ b/index.js @@ -874,8 +874,8 @@ client.on('roleDelete', role => { }); client.on('roleUpdate', (oldRole, newRole) => { - const removedPerms = oldRole.permissions.filter(perm => !newRole.hasPermission(perm)); - const addedPerms = newRole.permissions.filter(perm => !oldRole.hasPermission(perm)); + /*const removedPerms = oldRole.permissions.filter(perm => !newRole.hasPermission(perm)); + const addedPerms = newRole.permissions.filter(perm => !oldRole.hasPermission(perm));*/ const roleUpdateEmbed = new Discord.MessageEmbed() .setTitle("Role Updated") .addField("Name", `${oldRole.name} >> ${newRole.name}`) @@ -884,12 +884,12 @@ client.on('roleUpdate', (oldRole, newRole) => { .setFooter("Role ID: " + newRole.id) .setTimestamp() .setColor('c9ff00'); - if (removedPerms.array().length > 0) { + /*if (removedPerms.array().length > 0) { roleUpdateEmbed.addField("Permissions Removed", removedPerms.map(p => `${p}`).join(' • ')); } if (addedPerms.array().length > 0) { roleUpdateEmbed.addField("Permissions Added", addedPerms.map(p => `${p}`).join(' • ')); - } + }*/ collection.findOne({ guild_id: newRole.guild.id }, (error, result) => { if (error) { console.error;