Message
Message
(function() {
'use strict';
// Configuration
const apiKey = 'c7d4accb8b183aff4e0969b0cfb7e9a6'; // Replace with your
2Captcha API key
const siteKey = '4c1c3cad-00ab-4e76-b0e3-e79258cdaa06'; // The site key for
hCaptcha
const pageUrl = 'https://wildbet.gg'; // The URL of the page with the captcha
const webhookUrl =
'https://discord.com/api/webhooks/1004671307776020540/zZIBKNW4N9P2TxtoE2xURgu0zbwa_
yREck1fT93bPw28QndfvvWVtUthlFC9MYnKubNZ'; // Replace with your webhook URL
console.log('RAINZ MASTER IS ON BABY!');
let ws;
let rainEventDetected = false; // To track if a rain event was detected
let reconnectTimeout = 5000; // Default reconnect timeout
ws.onclose = function() {
console.log('WebSocket connection closed.');
};
fetch(joinUrl, payload)
.then(response => response.json())
.then(data => {
if (data.success && data.message ===
'API_EVENTS_RAIN_JOINSUCCESSFUL') {
console.log('Joined rain successfully.');
sendWebhook(`Joined rain event with ID: ${eventId}
successfully.`);
rainEventDetected = true; // Set flag to wait 2 minutes
before reconnecting
} else {
console.error('Failed to join rain:', data);
}
})
.catch(error => console.error('Error joining rain event:', error));
}, 5000);
}
fetch(webhookUrl, payload)
.then(response => {
if (response.ok) {
console.log('Webhook notification sent successfully.');
} else {
console.error('Failed to send webhook notification.');
}
})
.catch(error => console.error('Error sending webhook notification:',
error));
}
})();