Don't spam roles update

This commit is contained in:
loicbersier 2020-06-22 18:35:07 +02:00
parent 8ae3d1f6ed
commit 3ac4d298f8

View file

@ -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) {