forked from Galactic/galactic-bot
bugfix
This commit is contained in:
parent
37d69f315e
commit
9ca14d5e39
@ -212,12 +212,13 @@ module.exports = class AutoModeration extends Observer {
|
||||
filterResult.filter = 'word';
|
||||
log += `\nFilter result: ${inspect(filterResult)}`;
|
||||
|
||||
if (!silent) {
|
||||
const res = await this.client.rateLimiter.limitSend(msg.channel, wrapper.format('W_FILTER_DELETE', { user: author.id }), undefined, 'wordFilter').catch(catcher(255));
|
||||
|
||||
if (!silent && channel.permissionsFor(this.client.user)?.has('SendMessages')) {
|
||||
const res = await this.client.rateLimiter.limitSend(msg.channel, wrapper.format('W_FILTER_DELETE', { user: author.id }), undefined, 'wordFilter').catch(() => null);
|
||||
//const res = await msg.formattedRespond('W_FILTER_DELETE', { params: { user: author.id } });
|
||||
//if (res) res.delete({ timeout: 10000 }).catch(catcher(240));
|
||||
setTimeout(() => {
|
||||
res.delete?.().catch(() => { /**/ });
|
||||
res?.delete?.().catch(() => { /**/ });
|
||||
}, 10000);
|
||||
}
|
||||
this.client.rateLimiter.queueDelete(msg.channel, msg).catch(() => null);
|
||||
|
Loading…
Reference in New Issue
Block a user