This commit is contained in:
Erik 2022-05-11 14:34:33 +03:00
parent 71ba320356
commit cc182c059c
Signed by untrusted user: Navy.gif
GPG Key ID: 811EC0CD80E7E5FB

View File

@ -131,7 +131,7 @@ module.exports = class AutoModeration extends Observer {
log += `\nNormalised: ${content}`; log += `\nNormalised: ${content}`;
const catcher = (ln) => { 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 | // match: what was matched |
@ -287,7 +287,9 @@ module.exports = class AutoModeration extends Observer {
res.delete?.().catch(() => { /**/ }); res.delete?.().catch(() => { /**/ });
}, 10000); }, 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 // 6. Automated actions
if (actions.length) { if (actions.length) {