mahdiyar30301/ZorenixAI_botPublic · Bot Template

Not Bot Is Hacking You 🤣🤩

Utilityutility
ProfileTelegram
455 commands2 envUpdated 6h agoCreated Aug 26, 2026
Back to folder

commands/rmout.js

javascript · 58 lines

Raw
1/**#command2name: rmout3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12/**#command13name: rmout14answer: 15keyboard: 16parse_mode: markdown17aliases: 18allow_only_group: false19need_reply: false20is_web: 021#command**/22 23try {24try { Api.answerCallbackQuery({}); } catch (e0) {}25var uid = "";26if (typeof user !== "undefined" && user) {27  if (user.telegramid) uid = String(user.telegramid);28  else if (user.id) uid = String(user.id);29}30if (!uid) return;31var room = String((await db.global.get("rmu_" + uid)) || "");32if (!room) { Bot.sendMessage("تو اتاقی نیستی."); return; }33var host = String((await db.global.get("rmh_" + room)) || "");34var mem = [];35try { mem = JSON.parse(String((await db.global.get("rmm_" + room)) || "[]")); } catch (eM) { mem = []; }36if (!mem || typeof mem.length !== "number") mem = [];37var nxt = [];38var i = 0;39for (i = 0; i < mem.length; i++) {40  if (String(mem[i]) !== uid) nxt.push(String(mem[i]));41}42await db.global.set("rmu_" + uid, "");43if (host === uid || nxt.length === 0) {44  await db.global.set("rmh_" + room, "");45  await db.global.set("rmm_" + room, "[]");46  var j = 0;47  for (j = 0; j < nxt.length; j++) {48    await db.global.set("rmu_" + nxt[j], "");49    try { Api.sendMessage({ chat_id: nxt[j], text: "🏠 اتاق " + room + " بسته شد." }); } catch (eC) {}50  }51  Bot.sendMessage("اتاق بسته شد.");52  return;53}54await db.global.set("rmm_" + room, JSON.stringify(nxt));55Bot.sendMessage("از اتاق اومدی بیرون.");56} catch (e) {57  Bot.sendMessage("خطا rmout");58}