| 123456789101112131415161718192021222324252627282930 |
- //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
- m.isBot = m.id.startsWith('BAE5') && m.id.length === 16 || m.id.startsWith('3EB0') && m.id.length === 12 || m.id.startsWith('3EB0') && (m.id.length === 20 || m.id.length === 22) || m.id.startsWith('B24E') && m.id.length === 20;
- if (m.isBot) 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 name = await conn.getName(m.sender)
- let fakemek = {key: {participant: "[email protected]","remoteJid": "[email protected]"},"message": {"groupInviteMessage": {"groupJid": "[email protected]","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
- }
|