better slur censor
This commit is contained in:
parent
1dbd406935
commit
483ff7487c
1 changed files with 7 additions and 3 deletions
10
index.ts
10
index.ts
|
@ -80,7 +80,7 @@ client.once('ready', async () => {
|
|||
profaneFilter.addWords(...BuildConfig.BAD_WORDS);
|
||||
|
||||
if (profaneFilter.isProfane(e.content)) {
|
||||
await e.reply({
|
||||
const replyMsg = await e.reply({
|
||||
embeds: [
|
||||
{
|
||||
title: 'Profanity detected!',
|
||||
|
@ -91,8 +91,12 @@ client.once('ready', async () => {
|
|||
});
|
||||
await e.delete();
|
||||
|
||||
if (!e.member) return;
|
||||
await e.member.disableCommunicationUntil(Date.now() + 5 * 60 * 1000);
|
||||
setTimeout(() => {
|
||||
replyMsg.delete();
|
||||
}, 2500);
|
||||
|
||||
// if (!e.member) return;
|
||||
// await e.member.disableCommunicationUntil(Date.now() + 5 * 60 * 1000);
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue