455 commands2 envUpdated 7h agoCreated Aug 26, 2026
commands/invin.js
javascript · 55 lines
1/**#command2name: invin3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12/**#command13name: invin14answer: 15keyboard: 16parse_mode: 17aliases: 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;31 32var text = "";33if (typeof params !== "undefined" && params) text = String(params).trim();34if (!text && typeof message !== "undefined" && message) {35 if (typeof message === "object") text = String(message.text || message.caption || "");36 else text = String(message);37}38text = String(text || "").trim();39 40if (text === "لغو" || text === "🔴 لغو") {41 await db.global.set("await_plus_" + uid, "");42 await db.global.set("plus_mode_" + uid, "");43 Bot.sendMessage("لغو شد");44 return;45}46var tid = String(text).replace(/[^0-9]/g, "");47if (tid.length < 5) { Bot.sendMessage("آیدی عددی."); return; }48if (tid === uid) { Bot.sendMessage("به خودت نه."); return; }49await db.global.set("inv_tgt_" + uid, tid);50await db.global.set("inv_sel_" + uid, "-1");51await db.global.set("await_plus_" + uid, "");52await db.global.set("plus_mode_" + uid, "");53try { Bot.runCommand("invnx"); } catch (e1) {}54 55} catch (e) { Bot.sendMessage("خطا invin"); }