455 commands2 envUpdated 7h agoCreated Aug 26, 2026
commands/rol_ok.js
javascript · 44 lines
1/**#command2name: rol_ok3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12/**#command13name: rol_ok14answer: 15keyboard: 16parse_mode: markdown17aliases: 18allow_only_group: false19need_reply: false20is_web: 021#command**/22 23try {24try { Api.answerCallbackQuery({ text: "قوانین تایید شد", show_alert: false }); } catch (e0) {}25 26var uid = "";27var uidB = "";28if (typeof user !== "undefined" && user) {29 if (user.telegramid) uid = String(user.telegramid);30 if (user.id) uidB = String(user.id);31}32if (!uid && uidB) uid = uidB;33if (!uid) { Bot.sendMessage("uid نیست"); return; }34 35await db.global.set("rules_ok_" + uid, "1");36if (uidB) await db.global.set("rules_ok_" + uidB, "1");37await db.global.set("join_ok_" + uid, "1");38if (uidB) await db.global.set("join_ok_" + uidB, "1");39 40Bot.sendMessage("✅ قوانین تایید شد. ربات باز شد.");41Bot.runCommand("/start");42} catch (e) {43 Bot.sendMessage("خطا rol_ok");44}