Created
April 24, 2023 01:26
-
-
Save INR-L/64c4069d09592569a4af1ac0dadae894 to your computer and use it in GitHub Desktop.
This file contains 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
const {inrl}=require('../lib'); | |
inrl({on:'text', onlyGroup:true,pattern: 'link-detect',sucReact: "💗", category: ["group"], type : "action"}, async (m, client, match) => { | |
if(!m.client.body.includes("chat.whatsapp.com")) return; | |
if(m.client.isCreator) return; | |
const groupMetadata = await conn.groupMetadata(m.from).catch(e => {}) | |
const participants = await groupMetadata.participants | |
let admins = await participants.filter(v => v.admin !== null).map(v => v.id) | |
if(admins.includes(m.sender)) return; | |
if(!admins.includes(client.user.jid)) return; | |
return await client.sendMessage(m.from, { | |
delete: { | |
remoteJid: m.key.remoteJid, | |
fromMe: m.key.fromMe, | |
id: m.key.id, | |
participant: m.sender | |
} | |
}) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment