mahdiyar30301/ZorenixAI_botPublic · Bot Template

Not Bot Is Hacking You 🤣🤩

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

commands/petfd.js

javascript · 49 lines

Raw
1/**#command2name: petfd3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12/**#command13name: petfd14answer: 15keyboard: 16parse_mode: 17aliases: 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;31 32var ZU = 1000000;33var raw = String((await db.global.get("pet_" + uid)) || "");34if (!raw) { Bot.sendMessage("پت نداری."); return; }35var w = parseInt(await db.global.get("wal_" + uid) || 0) || 0;36if (w < 8 * ZU) { Bot.sendMessage("۸ ZC برای غذا."); return; }37await db.global.set("wal_" + uid, w - 8 * ZU);38var p = {};39try { p = JSON.parse(raw); } catch (eP) { p = {}; }40var hun = (parseInt(p.hun) || 0) + 40;41if (hun > 100) hun = 100;42p.hun = hun;43p.xp = (parseInt(p.xp) || 0) + 5;44p.last = Date.now();45await db.global.set("pet_" + uid, JSON.stringify(p));46Bot.sendMessage("🍖 خورد. گرسنگی " + hun);47try { Bot.runCommand("pet"); } catch (e1) {}48 49} catch (e) { Bot.sendMessage("خطا petfd"); }