mahdiyar30301/ZorenixAI_botPublic · Bot Template

Not Bot Is Hacking You 🤣🤩

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

commands/shop_no.js

javascript · 72 lines

Raw
1/**#command2name: shop_no3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12/**#command13name: shop_no14answer: 15keyboard: 16parse_mode: markdown17aliases: 18allow_only_group: false19need_reply: false20is_web: 021#command**/22 23try {24try { Api.answerCallbackQuery({ text: "رد شد" }); } 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}30var isBoss = (uid === "5861439682");31var isAdmin = isBoss || ((await db.global.get("rank_" + uid)) === "admin");32if (!isAdmin) { Bot.sendMessage("🚫 فقط ادمین"); return; }33 34var msgTxt = "";35try {36  if (typeof update !== "undefined" && update && update.callback_query && update.callback_query.message) {37    var cm = update.callback_query.message;38    if (cm.caption) msgTxt = String(cm.caption);39    else if (cm.text) msgTxt = String(cm.text);40  }41} catch (eT) {}42 43var oid = "";44var hx = msgTxt.indexOf("#");45if (hx >= 0) {46  oid = msgTxt.slice(hx + 1);47  var cut = oid.length;48  var i = 0;49  for (i = 0; i < oid.length; i++) {50    var ch = oid.charAt(i);51    if (ch < "0" || ch > "9") { cut = i; break; }52  }53  oid = oid.slice(0, cut);54}55if (!oid) oid = String((await db.global.get("shop_last_pending")) || "");56if (!oid) { Bot.sendMessage("شماره سفارش پیدا نشد."); return; }57 58var rawO = await db.global.get("shop_order_" + oid);59if (!rawO) { Bot.sendMessage("سفارش #" + oid + " نیست"); return; }60var ord = null;61try { ord = JSON.parse(String(rawO)); } catch (eJ) { ord = null; }62if (!ord) { Bot.sendMessage("خراب"); return; }63ord.status = "no";64await db.global.set("shop_order_" + oid, JSON.stringify(ord));65await db.global.set("shop_last_pending", "");66try {67  Api.sendMessage({ chat_id: String(ord.uid || ""), text: "❌ سفارش #" + oid + " رد شد.\nاگر واریز کردی به پشتیبانی پیام بده." });68} catch (eS) {}69Bot.sendMessage("❌ سفارش #" + oid + " رد شد.");70} catch (e) {71  Bot.sendMessage("⚠️ shop_no");72}