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 { stripIndents } = require('common-tags');
|
||||||
const { User, GuildMember } = require('discord.js');
|
const { User, GuildMember } = require('discord.js');
|
||||||
const { Collection } = require('@discordjs/collection');
|
const { Collection } = require('@discordjs/collection');
|
||||||
|
const { inspect } = require('util');
|
||||||
|
|
||||||
const { Emojis, Constants } = require('../../constants');
|
const { Emojis, Constants } = require('../../constants');
|
||||||
const { Util, Logger } = require('../../utilities');
|
const { Util, Logger } = require('../../utilities');
|
||||||
@ -439,11 +440,12 @@ class ModerationManager {
|
|||||||
if(!infraction) throw new Error('Undefined infraction');
|
if(!infraction) throw new Error('Undefined infraction');
|
||||||
const callBackAt = infraction.timestamp + infraction.duration;
|
const callBackAt = infraction.timestamp + infraction.duration;
|
||||||
if (callBackAt - currentDate <= 0) {
|
if (callBackAt - currentDate <= 0) {
|
||||||
|
this.logger.debug(`Expired infraction:\n${inspect(infraction)}`);
|
||||||
await resolve(infraction);
|
await resolve(infraction);
|
||||||
continue;
|
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, {
|
this.callbacks.set(infraction.id, {
|
||||||
timeout: setTimeout(async () => {
|
timeout: setTimeout(async () => {
|
||||||
|
Loading…
Reference in New Issue
Block a user