_antiArabe.js 1.5 KB

123456789101112131415161718192021222324252627282930313233
  1. let handler = m => m;
  2. handler.before = async function (m, { conn }) {
  3. const prefijosProhibidos = ['91', '92', '222', '93', '265', '61', '62', '966', '229', '40', '49', '20', '963', '967', '234', '210', '212'];
  4. const bot = global.db.data.settings[conn.user.jid] || {};
  5. const senderNumber = m.sender.split('@')[0];
  6. const user = global.db.data.users[m.sender]
  7. const text = (m.text || '').toLowerCase();
  8. if (["120363371008200788@newsletter", "120363371008200788@newsletter"].includes(m.chat)) return;
  9. if (m.fromMe) return;
  10. if (!bot.anticommand) return;
  11. const allowedCommands = ['piedra', 'papel', 'tijera', 'menu', 'estado', 'bots', 'serbot', 'jadibot', 'code'];
  12. if (allowedCommands.some(cmd => text.includes(cmd))) {
  13. if (user.banned && m.text.includes('PIEDRA') || m.text.includes('PAPEL') || m.text.includes('TIJERA') || m.text.includes('code') || m.text.includes('estado') || m.text.includes('bots') || m.text.includes('serbot') || m.text.includes('jadibot')) {
  14. user.banned = false;
  15. }
  16. return !0;
  17. }
  18. if (user.banned) return !1;
  19. const esProhibido = prefijosProhibidos.some(prefijo => senderNumber.startsWith(prefijo));
  20. if (esProhibido) {
  21. user.banned = true;
  22. console.log(`⚠️ Usuarios baneado ${m.sender}`)
  23. await conn.reply(m.chat, `⚠️ @${m.sender.split`@`[0]} ha sido baneado.\nPor orden de mi owner no puedes usar el bot.\n\nPARA USAR EL BOT HAZTE UN SUB BOT CON:\n/jadibot\n\n⚠️ \`\`\`Serás Baneados\`\`\` ⚠️`, m, { mentions: [m.sender] });
  24. return !1;
  25. }
  26. return !0;
  27. };
  28. export default handler;