forked from Galactic/galactic-bot
debugging
This commit is contained in:
parent
e6f35b2a76
commit
1a68e23548
@ -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 () => {
|
||||
|
Loading…
Reference in New Issue
Block a user