(async () => {
// Start Message
console.log("%cCreated by Crumbs :3", "color: #ff69b4; font-size: 16px; font-weight: bold;");
// Configuration
const START_ID = parseInt(prompt("Enter the Starting ID:", "1000"), 10);
const TOTAL_TO_FOLLOW = 10000;
const RETRY_DELAY = 10000;
const USER_DELAY = 100;
if (isNaN(START_ID)) {
console.error("Invalid Start ID provided. Script aborted.");
return;
}
const sleep = (ms) => new Promise(resolve => setTimeout(resolve, ms));
async function followWithRetry(startId, totalToFollow) {
let currentId = startId;
let successfulCount = 0;
const maxRetries = 5;
console.log(`🚀 Starting automation from ID: ${currentId}`);
while (successfulCount < totalToFollow) {
let success = false;
for (let attempt = 1; attempt <= maxRetries; attempt++) {
try {
const response = await fetch(`/api/followers/${currentId}`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' }
});
if (response.ok) {
console.log(`✅ Success for ${currentId} (${successfulCount + 1}/${totalToFollow})`);
success = true;
successfulCount++;
currentId++;
break;
} else {
console.warn(`⚠️ Attempt ${attempt} failed: ${response.status}`);
await sleep(RETRY_DELAY);
}
} catch (err) {
console.error(`❌ Network error:`, err);
await sleep(RETRY_DELAY);
}
}
if (!success) currentId++;
await sleep(USER_DELAY);
}
console.log("🏁 Mission accomplished.");
}
await followWithRetry(START_ID, TOTAL_TO_FOLLOW);
})();9 views