From cc182c059ce967a7be6cde00d5521c7cdec76d92 Mon Sep 17 00:00:00 2001 From: "Navy.gif" Date: Wed, 11 May 2022 14:34:33 +0300 Subject: [PATCH] loggign --- src/structure/components/observers/Automoderation.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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) {