mahdiyar30301/ZorenixAI_botPublic · Bot Template

Not Bot Is Hacking You 🤣🤩

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

commands/rms.js

javascript · 51 lines

Raw
1/**#command2name: rms3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12/**#command13name: rms14answer: 15keyboard: 16parse_mode: markdown17aliases: 18allow_only_group: false19need_reply: false20is_web: 021#command**/22 23try {24var uid = "";25if (typeof user !== "undefined" && user) {26  if (user.telegramid) uid = String(user.telegramid);27  else if (user.id) uid = String(user.id);28}29if (!uid) return;30var room = String((await db.global.get("rmu_" + uid)) || "");31if (!room) { Bot.sendMessage("اول /rm"); return; }32var raw = "";33if (typeof params !== "undefined" && params) raw = String(params).trim();34if (!raw) { Bot.sendMessage("بزن: /rms متن"); return; }35raw = raw.slice(0, 400);36var mem = [];37try { mem = JSON.parse(String((await db.global.get("rmm_" + room)) || "[]")); } catch (eM) { mem = []; }38if (!mem || typeof mem.length !== "number") mem = [];39var i = 0;40var n = 0;41for (i = 0; i < mem.length; i++) {42  var to = String(mem[i] || "");43  if (!to || to === uid) continue;44  var dnd = String((await db.global.get("dnd_" + to)) || "");45  if (dnd === "1") continue;46  try { Api.sendMessage({ chat_id: to, text: "🏠 " + room + "\n" + raw }); n += 1; } catch (eS) {}47}48Bot.sendMessage("✉️ به " + n + " نفر در اتاق رفت.");49} catch (e) {50  Bot.sendMessage("خطا rms");51}