From 67e9ed4d75ddab8c251b0e7acbd1a00868040d81 Mon Sep 17 00:00:00 2001 From: loicbersier Date: Mon, 15 Jun 2020 03:33:48 +0200 Subject: [PATCH] Don't send log message if the channel changed position ( as to avoid spam ) --- event/listeners/log/channelUpdate.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/event/listeners/log/channelUpdate.js b/event/listeners/log/channelUpdate.js index 3ddd35bf..7a19b56b 100644 --- a/event/listeners/log/channelUpdate.js +++ b/event/listeners/log/channelUpdate.js @@ -11,7 +11,7 @@ class channelUpdateListener extends Listener { async exec(oldChannel, newChannel) { const logStats = await LogStats.findOne({where: {guild: newChannel.guild.id}}); - if (oldChannel === newChannel) return; + if (oldChannel === newChannel || oldChannel.rawPosition !== newChannel.rawPosition) return; if (logStats) { const fetchedLogs = await newChannel.guild.fetchAuditLogs({ limit: 1,