mahdiyar30301/ZorenixAI_botPublic · Bot Template

Not Bot Is Hacking You 🤣🤩

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

commands/setcard.js

javascript · 44 lines

Raw
1/**#command2name: setcard3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12/**#command13name: setcard14answer: 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}29var isBoss = (uid === "5861439682");30var isAdmin = isBoss || ((await db.global.get("rank_" + uid)) === "admin");31if (!isAdmin) { Bot.sendMessage("فقط ادمین."); return; }32var raw = "";33if (typeof params !== "undefined" && params) raw = String(params).trim();34var ix = raw.indexOf("|");35if (ix < 1) { Bot.sendMessage("کارت شارژ:\n/setcard 5022291606999017 | مهدیار عزیزیان"); return; }36var card = raw.slice(0, ix).replace(/[^0-9]/g, "");37var name = raw.slice(ix + 1).trim().slice(0, 40);38if (card.length < 16) { Bot.sendMessage("شماره کارت کوتاه است."); return; }39await db.global.set("shop_card", card);40await db.global.set("shop_card_name", name);41Bot.sendMessage("✅ کارت شارژ ثبت شد.\n" + card + "\n" + name);42} catch (e) {43  Bot.sendMessage("خطا setcard");44}