From 3ac4d298f84e09c9f828f579e0819d531f7e9ff0 Mon Sep 17 00:00:00 2001 From: loicbersier Date: Mon, 22 Jun 2020 18:35:07 +0200 Subject: [PATCH] Don't spam roles update --- event/listeners/log/roleUpdate.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/event/listeners/log/roleUpdate.js b/event/listeners/log/roleUpdate.js index 45eae9fb..bb8a9a4d 100644 --- a/event/listeners/log/roleUpdate.js +++ b/event/listeners/log/roleUpdate.js @@ -13,7 +13,7 @@ class roleUpdateListener extends Listener { } async exec(oldRole, newRole) { - if (oldRole === newRole) return; + if (oldRole === newRole || oldRole.rawPosition !== newRole.rawPosition) return; const guild = oldRole.guild; const logStats = await LogStats.findOne({where: {guild: guild.id}}); if (logStats) {