mahdiyar30301/ZorenixAI_botPublic · Bot Template

Not Bot Is Hacking You 🤣🤩

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

commands/zcsend.js

javascript · 50 lines

Raw
1/**#command2name: zcsend3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12/**#command13name: zcsend14answer: 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 ZU = 1000000;30var raw = "";31if (typeof params !== "undefined" && params) raw = String(params).trim();32var parts = raw.split(" ");33var tid = String(parts[0] || "").replace(/[^0-9]/g, "");34var zc = parseFloat(parts[1]) || 0;35if (!tid || zc <= 0) {36  Bot.sendMessage("هدیه کوین:\n/zcsend آیدی مقدار\nمثال: /zcsend 123456789 2");37  return;38}39if (tid === uid) { Bot.sendMessage("به خودت نه."); return; }40var toman = Math.floor(zc * ZU);41var bal = parseInt(await db.global.get("wal_" + uid) || 0) || 0;42if (bal < toman) { Bot.sendMessage("موجودی کم است. کیف: " + (bal / ZU) + " ZC"); return; }43await db.global.set("wal_" + uid, bal - toman);44var tb = parseInt(await db.global.get("wal_" + tid) || 0) || 0;45await db.global.set("wal_" + tid, tb + toman);46Bot.sendMessage("✅ " + zc + " ZC برای " + tid + " ارسال شد.\nباقی: " + ((bal - toman) / ZU) + " ZC");47try { Api.sendMessage({ chat_id: tid, text: "🎁 " + zc + " ZC هدیه گرفتی." }); } catch (eN) {}48} catch (e) {49  Bot.sendMessage("خطا zcsend");50}