mahdiyar30301/ZorenixAI_botPublic · Bot Template

Not Bot Is Hacking You 🤣🤩

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

commands/petin.js

javascript · 62 lines

Raw
1/**#command2name: petin3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12/**#command13name: petin14answer: 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 text = "";33if (typeof params !== "undefined" && params) text = String(params).trim();34if (!text && typeof message !== "undefined" && message) {35  if (typeof message === "object") text = String(message.text || message.caption || "");36  else text = String(message);37}38text = String(text || "").trim();39 40if (text === "لغو" || text === "🔴 لغو") {41  await db.global.set("await_plus_" + uid, "");42  await db.global.set("plus_mode_" + uid, "");43  Bot.sendMessage("لغو شد");44  return;45}46if (String((await db.global.get("pet_" + uid)) || "")) {47  await db.global.set("await_plus_" + uid, "");48  Bot.sendMessage("پت داری.");49  return;50}51var kinds = ["🐺","🐱","🦊","🦉","🐉"];52var k = kinds[Date.now() % 5];53var nm = text.slice(0, 16);54if (nm.length < 1) nm = "Pet";55var p = { name: nm, kind: k, hun: 80, xp: 0, last: Date.now() };56await db.global.set("pet_" + uid, JSON.stringify(p));57await db.global.set("await_plus_" + uid, "");58await db.global.set("plus_mode_" + uid, "");59Bot.sendMessage("🐾 پت آمد: " + k + " " + nm);60try { Bot.runCommand("pet"); } catch (e1) {}61 62} catch (e) { Bot.sendMessage("خطا petin"); }