diff --git a/src/structure/components/observers/Automoderation.js b/src/structure/components/observers/Automoderation.js index d20a9d1..d36916f 100644 --- a/src/structure/components/observers/Automoderation.js +++ b/src/structure/components/observers/Automoderation.js @@ -131,7 +131,7 @@ module.exports = class AutoModeration extends Observer { log += `\nNormalised: ${content}`; const catcher = (ln) => { - return () => this.logger.debug(`Issue with promise on line ${ln}`); + return (error) => this.logger.debug(`Issue with promise on line ${ln}:\n${error.stack}`); }; // match: what was matched | @@ -287,7 +287,9 @@ module.exports = class AutoModeration extends Observer { res.delete?.().catch(() => { /**/ }); }, 10000); } - this.client.rateLimiter.queueDelete(msg.channel, msg).catch(catcher(269)); + this.client.rateLimiter.queueDelete(msg.channel, msg).catch((err) => { + this.logger.error(err.stack); + }); // 6. Automated actions if (actions.length) {