mahdiyar30301/ZorenixAI_botPublic · Bot Template

Not Bot Is Hacking You 🤣🤩

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

commands/cffj.js

javascript · 52 lines

Raw
1/**#command2name: cffj3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12/**#command13name: cffj14answer: 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;31var st = String((await db.global.get("cff_st")) || "off");32if (st !== "join") { Bot.sendMessage("ثبت‌نام باز نیست."); return; }33var endAt = parseInt(await db.global.get("cff_end_at") || 0) || 0;34if (endAt > 0 && Date.now() > endAt) {35  try { Bot.runCommand("cffgo"); } catch (eG) {}36  Bot.sendMessage("زمان ثبت‌نام تمام شد.");37  return;38}39var list = [];40try { list = JSON.parse(String((await db.global.get("cff_list")) || "[]")); } catch (eL) { list = []; }41if (!list || typeof list.length !== "number") list = [];42var i = 0;43for (i = 0; i < list.length; i++) {44  if (list[i] && String(list[i].uid) === uid) { Bot.sendMessage("قبلاً ثبت شدی."); return; }45}46var mx = parseInt(await db.global.get("cff_max") || 8) || 8;47if (list.length >= mx) { Bot.sendMessage("ظرفیت پر شد."); return; }48await db.global.set("await_cff_" + uid, "name");49await db.global.set("cff_ustep_" + uid, "ign");50await db.global.set("cff_uans_" + uid, "{}");51Bot.sendMessage("ثبت‌نام کاستوم\n۱) اسم فری‌فایر (IGN) را بفرست.\nلغو: لغو");52} catch (e) { Bot.sendMessage("خطا cffj"); }