455 commands2 envUpdated 6h agoCreated Aug 26, 2026
commands/slt.js
javascript · 62 lines
1/**#command2name: slt3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12/**#command13name: slt14answer: 15keyboard: 16parse_mode: markdown17aliases: 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;31var gift = await db.global.get("wal_gift_" + uid);32if (!gift) {33 await db.global.set("wal_gift_" + uid, "1");34 var c0 = parseInt(await db.global.get("wal_" + uid) || 0) || 0;35 await db.global.set("wal_" + uid, c0 + 10000);36}37var cost = 500;38var bal = parseInt(await db.global.get("wal_" + uid) || 0) || 0;39if (bal < cost) { Bot.sendMessage("اسلات ۵ ZC. کیف: " + (bal / 100) + " ZC"); return; }40await db.global.set("wal_" + uid, bal - cost);41var icons = ["🍒", "🍋", "⭐", "💎", "7️⃣"];42var a = icons[Math.floor(Math.random() * 5)];43var b = icons[Math.floor(Math.random() * 5)];44var c = icons[Math.floor(Math.random() * 5)];45var win = 0;46if (a === b && b === c) {47 if (a === "💎" || a === "7️⃣") win = 2500;48 else win = 1500;49} else if (a === b || b === c || a === c) win = 800;50if (win) {51 var nb = parseInt(await db.global.get("wal_" + uid) || 0) || 0;52 await db.global.set("wal_" + uid, nb + win);53}54var now = parseInt(await db.global.get("wal_" + uid) || 0) || 0;55var msg = "🎰 " + a + " " + b + " " + c + "\n";56if (win) msg = msg + "✅ +" + (win / 100) + " ZC";57else msg = msg + "❌ هیچ";58msg = msg + "\nکیف: " + (now / 100) + " ZC\nنقد نمیشود.";59Bot.sendMessage(msg);60} catch (e) {61 Bot.sendMessage("خطا slt");62}