diff --git a/src/structure/client/ModerationManager.js b/src/structure/client/ModerationManager.js index f69bd9a..aea5323 100644 --- a/src/structure/client/ModerationManager.js +++ b/src/structure/client/ModerationManager.js @@ -1,6 +1,7 @@ const { stripIndents } = require('common-tags'); const { User, GuildMember } = require('discord.js'); const { Collection } = require('@discordjs/collection'); +const { inspect } = require('util'); const { Emojis, Constants } = require('../../constants'); const { Util, Logger } = require('../../utilities'); @@ -439,11 +440,12 @@ class ModerationManager { if(!infraction) throw new Error('Undefined infraction'); const callBackAt = infraction.timestamp + infraction.duration; if (callBackAt - currentDate <= 0) { + this.logger.debug(`Expired infraction:\n${inspect(infraction)}`); await resolve(infraction); continue; } - this.logger.debug(`Going to resolve infraction in: ${Math.floor((callBackAt - currentDate) / 1000)} s`); + this.logger.debug(`Going to resolve infraction ${infraction.id} in: ${Math.floor((callBackAt - currentDate) / 1000)} s`); this.callbacks.set(infraction.id, { timeout: setTimeout(async () => {