1
0
Fork 0

Don't send log message if the channel changed position ( as to avoid spam )

akairo
loicbersier 4 years ago
parent f405116827
commit 67e9ed4d75

@ -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,

Loading…
Cancel
Save