-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_antiBadword.js
35 lines (27 loc) · 1.53 KB
/
_antiBadword.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
let badwordRegex = /anj(k|g)|ajn?(g|k)|a?njin(g|k)|bajingan|b(a?n)?gsa?t|ko?nto?l|me?me?(k|q)|pe?pe?(k|q)|meki|titi(t|d)|pe?ler|tetek|toket|ngewe|go?blo?k|to?lo?l|idiot|(k|ng)e?nto?(t|d)|jembut|bego|dajj?al|janc(u|o)k|pantek|puki ?(mak)?|kimak|kampang|lonte|col(i|mek?)|pelacur|henceu?t|nigga|fuck|dick|bitch|tits|bastard|asshole/i // tambahin sendiri
export function before(m, { isBotAdmin }) {
if (m.isBaileys && m.fromMe) return !0
let chat = global.db.data.chats[m.chat]
let user = global.db.data.users[m.sender]
let isBadword = badwordRegex.exec(m.text)
console.log(isBadword)
if (chat.antiBadword && isBadword) {
user.warning += 1
this.sendButton(m.chat, `*📮ᴛᴏxɪᴄ ᴛᴇʀᴅᴇᴛᴇᴋꜱɪ !\nhttps://saipulanuar.ga/ ᯤ*
あ Warning: ${user.warning} / 5 ┊
[❗] Jika warning mencapai 5 kamu akan *dibanned+kick*
Anda hanya bisa meminta Owner untuk membuka banned-nya !\n\n🌸 Bot By King Of Bear
“Barang siapa yang beriman kepada Allah dan Hari Akhir maka hendaklah dia berkata baik atau diam” (HR. al-Bukhari dan Muslim).`, wm, [['🎀CEK WARN', '.cekwarn'], ['🎐AUTHOR BOT', '.owner']], m)
if (user.warning >= 5) {
user.banned = true
if (m.isGroup) {
if (isBotAdmin) {
this.groupParticipantsUpdate(m.chat, [m.sender], "remove")
//this.groupSettingChange(m.chat, GroupSettingChange.messageSend, false)
}
}
}
}
return !0
}
// jasa buat by Fokusdotid (Fokus ID)