mahdiyar30301/ZorenixAI_botPublic · Bot Template

Not Bot Is Hacking You 🤣🤩

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

commands/claim_main_task.js

javascript · 54 lines

Raw
1/**#command2name: claim_main_task3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12/**#command13name: claim_main_task14answer: 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;31if (await db.global.get("claimed_task_main_" + uid)) {32  Bot.sendMessage("این جایزه را قبلاً گرفتی.");33  return;34}35var ok = false;36try {37  var res = await Api.getChatMember({ chat_id: "@ZorenixStudio", user_id: uid });38  var st = "";39  if (res && res.result && res.result.status) st = String(res.result.status);40  else if (res && res.status) st = String(res.status);41  if (st === "member" || st === "administrator" || st === "creator" || st === "restricted") ok = true;42} catch (eJ) {}43if (!ok) {44  Bot.sendMessage("اول عضو @ZorenixStudio شو، بعد تایید.");45  return;46}47await db.global.set("claimed_task_main_" + uid, "1");48var mc = parseInt(await db.global.get("m_coins_" + uid) || 0) || 0;49await db.global.set("m_coins_" + uid, mc + 5);50Bot.sendMessage("✅ +۵ سکه. موجودی: " + (mc + 5));51try { Bot.runCommand("task_list"); } catch (eR) {}52} catch (e) {53  Bot.sendMessage("⚠️ claim_main_task");54}