Spaces:
Runtime error
Runtime error
Update index.js
Browse files
index.js
CHANGED
|
@@ -1008,15 +1008,6 @@ function parseMatchTime(timeInput) {
|
|
| 1008 |
}
|
| 1009 |
|
| 1010 |
// --- 4. LINEUP LOGIC ---
|
| 1011 |
-
const DOMAINS = [
|
| 1012 |
-
"canary.discord.com",
|
| 1013 |
-
"ptb.discord.com",
|
| 1014 |
-
"discordapp.com",
|
| 1015 |
-
"discord.com"
|
| 1016 |
-
];
|
| 1017 |
-
|
| 1018 |
-
console.log('UptimeRobot: Service initialized and pinging internal heartbeat...');
|
| 1019 |
-
|
| 1020 |
const FORMATIONS = {
|
| 1021 |
"default": [["GK", "GK"], ["CB", "CB"], ["LB", "LB"], ["RB", "RB"], ["CM", "CM"], ["RW", "RW"], ["LW", "LW"]],
|
| 1022 |
"3-1-2": [["GK", "GK"], ["CB", "CB"], ["LB", "LB"], ["RB", "RB"], ["CM", "CM"], ["ST1", "ST"], ["ST2", "ST"]],
|
|
@@ -1318,12 +1309,12 @@ client.on('interactionCreate', async (interaction) => {
|
|
| 1318 |
|
| 1319 |
// --- 5. 24/7 HEARTBEAT & RECOVERY ---
|
| 1320 |
const fetch = require('node-fetch');
|
|
|
|
| 1321 |
// Self-ping to prevent sleep
|
| 1322 |
const spaceId = process.env.SPACE_ID;
|
| 1323 |
const url = spaceId ? `https://${spaceId.replace('/', '-').toLowerCase()}.hf.space` : 'http://localhost:7860';
|
| 1324 |
|
| 1325 |
if (spaceId) {
|
| 1326 |
-
console.log(`[*] Uptime Monitor: Monitoring ${url}`);
|
| 1327 |
fetch(url).catch(() => {});
|
| 1328 |
}
|
| 1329 |
|
|
|
|
| 1008 |
}
|
| 1009 |
|
| 1010 |
// --- 4. LINEUP LOGIC ---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1011 |
const FORMATIONS = {
|
| 1012 |
"default": [["GK", "GK"], ["CB", "CB"], ["LB", "LB"], ["RB", "RB"], ["CM", "CM"], ["RW", "RW"], ["LW", "LW"]],
|
| 1013 |
"3-1-2": [["GK", "GK"], ["CB", "CB"], ["LB", "LB"], ["RB", "RB"], ["CM", "CM"], ["ST1", "ST"], ["ST2", "ST"]],
|
|
|
|
| 1309 |
|
| 1310 |
// --- 5. 24/7 HEARTBEAT & RECOVERY ---
|
| 1311 |
const fetch = require('node-fetch');
|
| 1312 |
+
setInterval(async () => {
|
| 1313 |
// Self-ping to prevent sleep
|
| 1314 |
const spaceId = process.env.SPACE_ID;
|
| 1315 |
const url = spaceId ? `https://${spaceId.replace('/', '-').toLowerCase()}.hf.space` : 'http://localhost:7860';
|
| 1316 |
|
| 1317 |
if (spaceId) {
|
|
|
|
| 1318 |
fetch(url).catch(() => {});
|
| 1319 |
}
|
| 1320 |
|