forked from elrebelde21/LoliBot-MD
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9f5f32a
commit 80b9673
Showing
12 changed files
with
830 additions
and
361 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
import fetch from 'node-fetch' | ||
|
||
const isLinkTik = /tiktok.com/i | ||
const isLinkYt = /youtube.com|youtu.be/i | ||
const isLinkTel = /telegram.com|t.me/i | ||
const isLinkFb = /facebook.com|fb.me/i | ||
const isLinkIg = /instagram.com/i | ||
const isLinkTw = /twitter.com|x.com/i | ||
const isLinkDc = /discord.com|discord.gg/i | ||
const isLinkTh = /threads.net/i | ||
const isLinkTch = /twitch.tv/i | ||
|
||
let handler = m => m | ||
handler.before = async function (m, { conn, isAdmin, isBotAdmin, isOwner, isROwner }) { | ||
if (!m.isGroup) return | ||
if (!isAdmin || !isOwner || !isROwner || m.fromMe || !isBotAdmin) return | ||
|
||
let chat = global.db.data.chats[m.chat] | ||
let bot = global.db.data.settings[this.user.jid] || {} | ||
let delet = m.key.participant | ||
let bang = m.key.id | ||
let toUser = `${m.sender.split("@")[0]}` | ||
let aa = toUser + '@s.whatsapp.net' | ||
|
||
const isAntiLinkTik = isLinkTik.exec(m.text) | ||
const isAntiLinkYt = isLinkYt.exec(m.text) | ||
const isAntiLinkTel = isLinkTel.exec(m.text) | ||
const isAntiLinkFb = isLinkFb.exec(m.text) | ||
const isAntiLinkIg = isLinkIg.exec(m.text) | ||
const isAntiLinkTw = isLinkTw.exec(m.text) | ||
const isAntiLinkDc = isLinkDc.exec(m.text) | ||
const isAntiLinkTh = isLinkTh.exec(m.text) | ||
const isAntiLinkTch = isLinkTch.exec(m.text) | ||
|
||
if (chat.antiTiktok && isAntiLinkTik) { | ||
//if (chat.delete) return //conn.sendMessage(m.chat, { text: mid.mAdvertencia + mid.mAntiDelete }, { quoted: m }) | ||
if (isBotAdmin) { | ||
await conn.reply(m.chat, `*「 ANTILINK DETECTADO 」*\n@${toUser} 🤨 Rompiste las reglas del Grupo sera eliminado....`, null, { mentions: [aa] }) | ||
await conn.sendMessage(m.chat, { delete: { remoteJid: m.chat, fromMe: false, id: bang, participant: delet }}) | ||
let remove = await conn.groupParticipantsUpdate(m.chat, [m.sender], 'remove') | ||
if (remove[0].status === '404') return | ||
}} | ||
|
||
if (chat.antiYoutube && isAntiLinkYt) { | ||
//if (chat.delete) return //conn.sendMessage(m.chat, { text: mid.mAdvertencia + mid.mAntiDelete }, { quoted: m }) | ||
if (isBotAdmin) { | ||
await conn.reply(m.chat, `*「 ANTILINK DETECTADO 」*\n@${toUser} 🤨 Rompiste las reglas del Grupo sera eliminado....`, null, { mentions: [aa] }) | ||
await conn.sendMessage(m.chat, { delete: { remoteJid: m.chat, fromMe: false, id: bang, participant: delet }}) | ||
let remove = await conn.groupParticipantsUpdate(m.chat, [m.sender], 'remove') | ||
if (remove[0].status === '404') return | ||
}} | ||
|
||
if (chat.antiTelegram && isAntiLinkTel) { | ||
//if (chat.delete) return //conn.sendMessage(m.chat, { text: mid.mAdvertencia + mid.mAntiDelete }, { quoted: m }) | ||
if (isBotAdmin) { | ||
await conn.reply(m.chat, `*「 ANTILINK DETECTADO 」*\n@${toUser} 🤨 Rompiste las reglas del Grupo sera eliminado....`, null, { mentions: [aa] }) | ||
await conn.sendMessage(m.chat, { delete: { remoteJid: m.chat, fromMe: false, id: bang, participant: delet }}) | ||
let remove = await conn.groupParticipantsUpdate(m.chat, [m.sender], 'remove') | ||
if (remove[0].status === '404') return | ||
}} | ||
|
||
if (chat.antiFacebook && isAntiLinkFb) { | ||
//if (chat.delete) return //conn.sendMessage(m.chat, { text: mid.mAdvertencia + mid.mAntiDelete }, { quoted: m }) | ||
if (isBotAdmin) { | ||
await conn.reply(m.chat, `*「 ANTILINK DETECTADO 」*\n@${toUser} 🤨 Rompiste las reglas del Grupo sera eliminado....`, null, { mentions: [aa] }) | ||
await conn.sendMessage(m.chat, { delete: { remoteJid: m.chat, fromMe: false, id: bang, participant: delet }}) | ||
let remove = await conn.groupParticipantsUpdate(m.chat, [m.sender], 'remove') | ||
if (remove[0].status === '404') return | ||
}} | ||
|
||
if (chat.antiInstagram && isAntiLinkIg) { | ||
//if (chat.delete) return //conn.sendMessage(m.chat, { text: mid.mAdvertencia + mid.mAntiDelete }, { quoted: m }) | ||
if (isBotAdmin) { | ||
await conn.reply(m.chat, `*「 ANTILINK DETECTADO 」*\n@${toUser} 🤨 Rompiste las reglas del Grupo sera eliminado....`, null, { mentions: [aa] }) | ||
await conn.sendMessage(m.chat, { delete: { remoteJid: m.chat, fromMe: false, id: bang, participant: delet }}) | ||
let remove = await conn.groupParticipantsUpdate(m.chat, [m.sender], 'remove') | ||
if (remove[0].status === '404') return | ||
}} | ||
|
||
if (chat.antiTwitter && isAntiLinkTw) { | ||
//if (chat.delete) return //conn.sendMessage(m.chat, { text: mid.mAdvertencia + mid.mAntiDelete }, { quoted: m }) | ||
if (isBotAdmin) { | ||
await conn.reply(m.chat, `*「 ANTILINK DETECTADO 」*\n@${toUser} 🤨 Rompiste las reglas del Grupo sera eliminado....`, null, { mentions: [aa] }) | ||
await conn.sendMessage(m.chat, { delete: { remoteJid: m.chat, fromMe: false, id: bang, participant: delet }}) | ||
let remove = await conn.groupParticipantsUpdate(m.chat, [m.sender], 'remove') | ||
if (remove[0].status === '404') return | ||
}} | ||
|
||
if (chat.antiDiscord && isAntiLinkDc) { | ||
//if (chat.delete) return //conn.sendMessage(m.chat, { text: mid.mAdvertencia + mid.mAntiDelete }, { quoted: m }) | ||
if (isBotAdmin) { | ||
await conn.reply(m.chat, `*「 ANTILINK DETECTADO 」*\n@${toUser} 🤨 Rompiste las reglas del Grupo sera eliminado....`, null, { mentions: [aa] }) | ||
await conn.sendMessage(m.chat, { delete: { remoteJid: m.chat, fromMe: false, id: bang, participant: delet }}) | ||
let remove = await conn.groupParticipantsUpdate(m.chat, [m.sender], 'remove') | ||
if (remove[0].status === '404') return | ||
}} | ||
|
||
if (chat.antiThreads && isAntiLinkTh) { | ||
//if (chat.delete) return conn.sendMessage(m.chat, { text: mid.mAdvertencia + mid.mAntiDelete }, { quoted: m }) | ||
if (isBotAdmin) { | ||
await conn.reply(m.chat, `*「 ANTILINK DETECTADO 」*\n@${toUser} 🤨 Rompiste las reglas del Grupo sera eliminado....`, null, { mentions: [aa] }) | ||
await conn.sendMessage(m.chat, { delete: { remoteJid: m.chat, fromMe: false, id: bang, participant: delet }}) | ||
let remove = await conn.groupParticipantsUpdate(m.chat, [m.sender], 'remove') | ||
if (remove[0].status === '404') return | ||
}} | ||
|
||
if (chat.antiTwitch && isAntiLinkTch) { | ||
//if (chat.delete) return conn.sendMessage(m.chat, { text: mid.mAdvertencia + mid.mAntiDelete }, { quoted: m }) | ||
if (isBotAdmin) { | ||
await conn.reply(m.chat, `*「 ANTILINK DETECTADO 」*\n@${toUser} 🤨 Rompiste las reglas del Grupo sera eliminado....`, null, { mentions: [aa] }) | ||
await conn.sendMessage(m.chat, { delete: { remoteJid: m.chat, fromMe: false, id: bang, participant: delet }}) | ||
let remove = await conn.groupParticipantsUpdate(m.chat, [m.sender], 'remove') | ||
if (remove[0].status === '404') return | ||
}} | ||
|
||
return !0 | ||
} | ||
export default handler |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
let linkRegex = /https:/i | ||
export async function before(m, { isAdmin, isBotAdmin, text }) { | ||
if (m.isBaileys && m.fromMe) | ||
return !0 | ||
if (!m.isGroup) return !1 | ||
let chat = global.db.data.chats[m.chat] | ||
let delet = m.key.participant | ||
let bang = m.key.id | ||
const user = `@${m.sender.split`@`[0]}`; | ||
let bot = global.db.data.settings[this.user.jid] || {} | ||
const isGroupLink = linkRegex.exec(m.text) | ||
if (chat.antiLink2 && isGroupLink && !isAdmin) { | ||
if (isBotAdmin) { | ||
const linkThisGroup = `https://chat.whatsapp.com/${await this.groupInviteCode(m.chat)}` | ||
const linkThisGroup2 = `https://www.youtube.com/` | ||
const linkThisGroup3 = `https://youtu.be/` | ||
if (m.text.includes(linkThisGroup)) return !0 | ||
if (m.text.includes(linkThisGroup2)) return !0 | ||
if (m.text.includes(linkThisGroup3)) return !0 | ||
} | ||
await conn.sendMessage(m.chat, {text: `*「 ANTILINK DETECTADO 」*\n\n${user} 🤨 Rompiste las reglas del Grupo sera eliminado....`, mentions: [m.sender]}, {quoted: m}) | ||
if (!isBotAdmin) return m.reply('*Te salvarte gil, no soy admin no te puedo eliminar*') | ||
if (isBotAdmin) { | ||
await conn.sendMessage(m.chat, { delete: { remoteJid: m.chat, fromMe: false, id: bang, participant: delet }}) | ||
let responseb = await conn.groupParticipantsUpdate(m.chat, [m.sender], 'remove') | ||
if (responseb[0].status === "404") return | ||
} else if (!bot.restrict) return m.reply('*𝙀𝙡 𝙥𝙧𝙤𝙥𝙞𝙚𝙩𝙖𝙧𝙞𝙤 𝙙𝙚𝙡 𝙗𝙤𝙩 𝙣𝙤 𝙩𝙞𝙚𝙣𝙚 𝙖𝙘𝙩𝙞𝙫𝙖𝙙𝙤 𝙚𝙡 𝙧𝙚𝙨𝙩𝙧𝙞𝙘𝙘𝙞𝙤́𝙣 (𝙚𝙣𝙖𝙗𝙡𝙚 𝙧𝙚𝙨𝙩𝙧𝙞𝙘𝙩) 𝙘𝙤𝙣𝙩𝙖𝙘𝙩𝙚 𝙘𝙤𝙣 𝙚𝙡 𝙥𝙖𝙧𝙖 𝙦𝙪𝙚 𝙡𝙤𝙨 𝙝𝙖𝙗𝙞𝙡𝙞𝙩𝙚*') | ||
} | ||
return !0 | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
//By @NeKosmic || https://github.com/NeKosmic/ // | ||
|
||
import * as fs from 'fs' | ||
|
||
export async function before(m, { conn, isAdmin, isBotAdmin, usedPrefix }) { | ||
if (m.isBaileys && m.fromMe) return !0 | ||
if (!m.isGroup) return !1 | ||
let chat = global.db.data.chats[m.chat] | ||
let bot = global.db.data.settings[this.user.jid] || {} | ||
let delet = m.key.participant | ||
let bang = m.key.id | ||
let name = await conn.getName(m.sender) | ||
let fakemek = {key: {participant: "0@s.whatsapp.net","remoteJid": "0@s.whatsapp.net"},"message": {"groupInviteMessage": {"groupJid": "51995386439-1616969743@g.us","inviteCode": "m","groupName": "P", "caption": 'ʟᴏʟɪʙᴏᴛ-ᴍᴅ', 'jpegThumbnail': null}}} | ||
if (chat.antiTraba && m.text.length > 5000) { //Cantidad máxima de caracteres aceptados en un mensaje// | ||
if (isAdmin) return conn.sendMessage(m.chat, { text: `⚠️El administrador @${m.sender.split("@")[0]} acaba de enviar un texto que contiene muchos caracteres -.-!`, mentions: [m.sender] }, { quoted: fakemek }) | ||
conn.sendButton(m.chat, `*[ ! ] Se detecto un mensaje que contiene muchos caracteres [ ! ]*\n`, `${isBotAdmin ? '' : 'No soy administrador, no puedo hacer nada :/'}`, null, [['ᴅᴇsᴀᴄᴛɪᴠᴀ ᴀɴᴛɪᴛʀᴀʙᴀ', `/disable antitraba`]], null, null, m) | ||
//await conn.sendButton(m.chat, `*[ ! ] Se detecto un mensaje que contiene muchos caracteres [ ! ]*\n`, `${isBotAdmin ? '' : 'No soy administrador, no puedo hacer nada :/'}`, author, ['[ ]', usedPrefix+'apagar antitraba'], fakemek ) | ||
if (isBotAdmin) { | ||
conn.sendMessage(m.chat, { delete: { remoteJid: m.chat, fromMe: false, id: bang, participant: delet }}) | ||
setTimeout(() => { | ||
conn.sendMessage(m.chat, { text: `Marcar el chat como leido ✓\n${"\n".repeat(400)}\n• El número : wa.me/${m.sender.split("@")[0]}\n• Alias : ${name}\n‼️Acaba de enviar un texto que contiene muchos caracteres que puede ocasionar fallos en los dispositivos`, mentions: [m.sender] }, { quoted: fakemek }) | ||
}, 0) | ||
setTimeout(() => { | ||
conn.groupParticipantsUpdate(m.chat, [m.sender], 'remove') | ||
}, 1000)} else if (!bot.restrict) return m.reply(`Este comando esta desactivado por mi jefe`) | ||
} | ||
return !0 | ||
} |
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
Oops, something went wrong.