Reooiq96 commited on
Commit
36683f1
·
verified ·
1 Parent(s): 3254008

Update index.js

Browse files
Files changed (1) hide show
  1. index.js +4 -14
index.js CHANGED
@@ -11,7 +11,6 @@ const ACCOUNTS_TO_WATCH = process.env.ACCOUNTS_LIST ? process.env.ACCOUNTS_LIST.
11
 
12
  dns.setServers(['8.8.8.8']);
13
 
14
- // --- 🛠️ دوال المساعدة ---
15
  function getBaghdadTime() {
16
  return new Intl.DateTimeFormat('ar-IQ', {
17
  timeZone: 'Asia/Baghdad', dateStyle: 'medium', timeStyle: 'medium', hour12: true
@@ -30,11 +29,10 @@ async function sendToTelegram(text) {
30
  } catch (e) { console.log("⚠️ خطأ تلجرام"); }
31
  }
32
 
33
- // --- 📡 المحرك الرئيسي للرادار ---
34
  function startRadar(username) {
35
  let user = username.trim();
36
 
37
- // الحل المباشر: وضع القيمة يدوياً داخل الكود 🛠️
38
  let connection = new WebcastPushConnection(user, {
39
  processInitialData: true,
40
  enableWebsocketUpgrade: true,
@@ -42,7 +40,7 @@ function startRadar(username) {
42
  clientParams: {
43
  "app_language": "ar-IQ",
44
  "device_platform": "web",
45
- "tt_target_idc": "useast1a" // القيمة مثبتة هنا مباشرة ✅
46
  }
47
  });
48
 
@@ -53,7 +51,7 @@ function startRadar(username) {
53
  setTimeout(() => startRadar(user), 30000);
54
  });
55
 
56
- // --- 💰 رادار الحقائب والصناديق ---
57
  connection.on('treasureBox', (data) => {
58
  sendToTelegram(`💰 <b>حقيبة عملات!</b>\n👤 الحساب: @${user}\n💎 القيمة: ${data.coins || "؟"}`);
59
  });
@@ -62,13 +60,7 @@ function startRadar(username) {
62
  sendToTelegram(`🎁 <b>صندوق حظ!</b>\n👤 الحساب: @${user}\n💎 القيمة: ${data.diamonds || "؟"}`);
63
  });
64
 
65
- // --- 🎤 رادار الكيست (الضيوف) ---
66
- // إذا صعد شخص جيست، تيك توك يرسل حدث 'roomUser' المحدث
67
- connection.on('roomUser', (data) => {
68
- // هنا يمكن إضافة كود للكشف عن الجيستات لاحقاً
69
- });
70
-
71
- // --- 👑 رادار VIP والداعمين والسبام ---
72
  connection.on('member', (data) => {
73
  if (data.userLevel >= 40) {
74
  sendToTelegram(`👑 <b>دخول VIP (Lvl ${data.userLevel}):</b> @${data.uniqueId}`);
@@ -80,10 +72,8 @@ function startRadar(username) {
80
  });
81
  }
82
 
83
- // تشغيل الرادار
84
  if (ACCOUNTS_TO_WATCH.length > 0) {
85
  ACCOUNTS_TO_WATCH.forEach(user => startRadar(user));
86
  }
87
 
88
- // سيرفر لإبقاء الخدمة تعمل
89
  http.createServer((req, res) => res.end('Radar Mega V7 Active 🚀')).listen(7860);
 
11
 
12
  dns.setServers(['8.8.8.8']);
13
 
 
14
  function getBaghdadTime() {
15
  return new Intl.DateTimeFormat('ar-IQ', {
16
  timeZone: 'Asia/Baghdad', dateStyle: 'medium', timeStyle: 'medium', hour12: true
 
29
  } catch (e) { console.log("⚠️ خطأ تلجرام"); }
30
  }
31
 
 
32
  function startRadar(username) {
33
  let user = username.trim();
34
 
35
+ // --- 🚀 هذا هو الجزء الذي يسبب الخطأ الأحمر إذا لم يكن دقيقاً ---
36
  let connection = new WebcastPushConnection(user, {
37
  processInitialData: true,
38
  enableWebsocketUpgrade: true,
 
40
  clientParams: {
41
  "app_language": "ar-IQ",
42
  "device_platform": "web",
43
+ "tt_target_idc": "useast1a" // تأكد من كتابتها هكذا تماماً ✅
44
  }
45
  });
46
 
 
51
  setTimeout(() => startRadar(user), 30000);
52
  });
53
 
54
+ // رادار الحقائب
55
  connection.on('treasureBox', (data) => {
56
  sendToTelegram(`💰 <b>حقيبة عملات!</b>\n👤 الحساب: @${user}\n💎 القيمة: ${data.coins || "؟"}`);
57
  });
 
60
  sendToTelegram(`🎁 <b>صندوق حظ!</b>\n👤 الحساب: @${user}\n💎 القيمة: ${data.diamonds || "؟"}`);
61
  });
62
 
63
+ // رادار VIP
 
 
 
 
 
 
64
  connection.on('member', (data) => {
65
  if (data.userLevel >= 40) {
66
  sendToTelegram(`👑 <b>دخول VIP (Lvl ${data.userLevel}):</b> @${data.uniqueId}`);
 
72
  });
73
  }
74
 
 
75
  if (ACCOUNTS_TO_WATCH.length > 0) {
76
  ACCOUNTS_TO_WATCH.forEach(user => startRadar(user));
77
  }
78
 
 
79
  http.createServer((req, res) => res.end('Radar Mega V7 Active 🚀')).listen(7860);