grupo-kicknum-kicknun.js 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /* Codigo Creado Por Bruno Sobrino
  2. (https://github.com/BrunoSobrino/TheMystic-Bot-MD)
  3. */
  4. const handler = async (m, {conn, args, groupMetadata, participants, usedPrefix, command, isBotAdmin, isSuperAdmin}) => {
  5. if (!args[0]) return m.reply(`*โš ๏ธ ๐ˆ๐ง๐ ๐ซ๐ž๐ฌ๐ž ๐ž๐ฅ ๐ฉ๐ซ๐ž๐Ÿ๐ข๐ฃ๐จ ๐๐ž ๐š๐ฅ๐ ๐ฎ๐ง ๐ฉ๐š๐ข๐ฌ ๐ฉ๐š๐ซ๐š ๐›๐ฎ๐ฌ๐œ๐š๐ซ ๐ง๐ฎ๐ฆ๐ž๐ซ๐จ๐ฌ ๐ž๐ง ๐ž๐ฌ๐ญ๐ž ๐ ๐ซ๐ฎ๐ฉ๐จ ๐๐ž ๐ž๐ฌ๐ž ๐ฉ๐š๐ข๐ฌ, ๐„๐ฃ๐ž๐ฆ๐ฉ๐ฅ๐จ: ${usedPrefix + command} 52*`);
  6. if (isNaN(args[0])) return m.reply(`*โš ๏ธ ๐ˆ๐ง๐ ๐ซ๐ž๐ฌ๐ž ๐ž๐ฅ ๐ฉ๐ซ๐ž๐Ÿ๐ข๐ฃ๐จ ๐๐ž ๐š๐ฅ๐ ๐ฎ๐ง ๐ฉ๐š๐ข๐ฌ ๐ฉ๐š๐ซ๐š ๐›๐ฎ๐ฌ๐œ๐š๐ซ ๐ง๐ฎ๐ฆ๐ž๐ซ๐จ๐ฌ ๐ž๐ง ๐ž๐ฌ๐ญ๐ž ๐ ๐ซ๐ฎ๐ฉ๐จ ๐๐ž ๐ž๐ฌ๐ž ๐ฉ๐š๐ข๐ฌ, ๐„๐ฃ๐ž๐ฆ๐ฉ๐ฅ๐จ: ${usedPrefix + command} 52*`);
  7. const lol = args[0].replace(/[+]/g, '');
  8. const ps = participants.map((u) => u.id).filter((v) => v !== conn.user.jid && v.startsWith(lol || lol));
  9. const bot = global.db.data.settings[conn.user.jid] || {};
  10. if (ps == '') return m.reply(`*โš ๏ธ ๐„๐ง ๐ž๐ฌ๐ญ๐ž ๐ ๐ซ๐ฎ๐ฉ๐จ ๐ง๐จ ๐ก๐š๐ฒ ๐ง๐ข๐ง๐ ๐ฎ๐ง ๐ง๐ฎ๐ฆ๐ž๐ซ๐จ ๐œ๐จ๐ง ๐ž๐ฅ ๐ฉ๐ซ๐ž๐Ÿ๐ข๐ฃ๐จ:* [+${lol}]`);
  11. const numeros = ps.map((v)=> 'โญ” @' + v.replace(/@.+/, ''));
  12. const delay = (time) => new Promise((res)=>setTimeout(res, time));
  13. switch (command) {
  14. case 'listanum': case 'listnum':
  15. conn.reply(m.chat, `*๐‹๐ข๐ฌ๐ญ๐š ๐๐ž ๐ง๐ฎ๐ฆ๐ž๐ซ๐จ ๐œ๐จ๐ง ๐ž๐ฅ ๐ฉ๐ซ๐ž๐Ÿ๐ข๐ฃ๐จ +${lol} ๐ช๐ฎ๐ž ๐ž๐ฌ๐ญ๐š๐ง ๐ž๐ง ๐ž๐ฌ๐ญ๐ž ๐ ๐ซ๐ฎ๐ฉ๐จ:*\n\n` + numeros.join`\n`, m, {mentions: ps});
  16. break;
  17. case 'kicknum':
  18. if (!bot.restrict) return m.reply('*โš ๏ธ El propietario del bot tiene desactivo el restrict, contacte con el para que lo habilite:* #on restrict');
  19. if (!isBotAdmin) return m.reply('*โš ๏ธ Necesito ser admin*');
  20. conn.reply(m.chat, `*โš ๏ธ ๐ˆ๐ง๐ข๐œ๐ข๐š๐ง๐๐จ ๐ž๐ฅ๐ข๐ฆ๐ข๐ง๐š๐œ๐ข๐จ๐ง ๐๐ž ๐ง๐ฎ๐ฆ๐ž๐ซ๐จ๐ฌ ๐œ๐จ๐ง ๐ž๐ฅ ๐ฉ๐ซ๐ž๐Ÿ๐ข๐ฃ๐จ: +${lol}, ๐œ๐š๐๐š 10 ๐ฌ๐ž๐ ๐ฎ๐ง๐๐จ๐ฌ ๐ฌ๐ž ๐ž๐ฅ๐ข๐ฆ๐ข๐ง๐š๐ซ๐š ๐š ๐ฎ๐ง ๐ฎ๐ฌ๐ฎ๐š๐ซ๐ข๐จ*`, m);
  21. const ownerGroup = m.chat.split`-`[0] + '@s.whatsapp.net';
  22. const users = participants.map((u) => u.id).filter((v) => v !== conn.user.jid && v.startsWith(lol || lol));
  23. for (const user of users) {
  24. const error = `@${user.split('@')[0]} สแด€ สœแด€ sษชแด…แด แด‡สŸษชแดษชษดแด€แด…แด แด สœแด€ แด€ส™แด€ษดแด…แดษดแด€แด…แด แด‡สŸ ษขส€แดœแด˜แด*`;
  25. if (user !== ownerGroup + '@s.whatsapp.net' && user !== global.conn.user.jid && user !== global.owner + '@s.whatsapp.net' && user.startsWith(lol || lol) && user !== isSuperAdmin && isBotAdmin && bot.restrict) {
  26. await delay(2000);
  27. const responseb = await conn.groupParticipantsUpdate(m.chat, [user], 'remove');
  28. if (responseb[0].status === '404') m.reply(error, m.chat, {mentions: conn.parseMention(error)});
  29. await delay(10000);
  30. } else return m.reply('*[โ—] ๐™ด๐š๐š๐™พ๐š*')
  31. }
  32. break;
  33. }};
  34. handler.command = /^(listanum|kicknum|listnum)$/i;
  35. handler.group = handler.botAdmin = handler.admin = true;
  36. handler.fail = null;
  37. export default handler;