Last active
February 26, 2023 16:34
-
-
Save INR-L/5d10c539f42fe03f4993471c88cdc00c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//pattern: ["blockpm"] | |
const { setWarn, ResetWarn, ListWarn } = require('../lib/database/warndb') | |
let sender = ""//number strting value | |
let count = "" //conting of user | |
module.exports = async(msg, conn, m, store) => { | |
if(m.isGroup) return; | |
if(!m.sender.startsWith(sender)) return; | |
let s = m.sender.split("@")[0]; | |
let t = m.sender.split("@")[0]; | |
let dd = await setWarn(s, t, "not allowed"); | |
let cound = count - dd.count; | |
await m.send(`⚠️warning⚠️ if ${cound} equal to 0 you may be blocked! so dont spam please`); | |
if(cound<="0"){ | |
await ResetWarn(s, t, "not allowed"); | |
return await client.updateBlockStatus(message.sender, "block") // Block user | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment