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);
|
profaneFilter.addWords(...BuildConfig.BAD_WORDS);
|
||||||
|
|
||||||
if (profaneFilter.isProfane(e.content)) {
|
if (profaneFilter.isProfane(e.content)) {
|
||||||
await e.reply({
|
const replyMsg = await e.reply({
|
||||||
embeds: [
|
embeds: [
|
||||||
{
|
{
|
||||||
title: 'Profanity detected!',
|
title: 'Profanity detected!',
|
||||||
|
@ -91,8 +91,12 @@ client.once('ready', async () => {
|
||||||
});
|
});
|
||||||
await e.delete();
|
await e.delete();
|
||||||
|
|
||||||
if (!e.member) return;
|
setTimeout(() => {
|
||||||
await e.member.disableCommunicationUntil(Date.now() + 5 * 60 * 1000);
|
replyMsg.delete();
|
||||||
|
}, 2500);
|
||||||
|
|
||||||
|
// if (!e.member) return;
|
||||||
|
// await e.member.disableCommunicationUntil(Date.now() + 5 * 60 * 1000);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue