const axios = require('axios');

async function sendAlert(message) {
    try {
        await axios.post(`https://api.telegram.org/bot${process.env.BOT_TOKEN}/sendMessage`, {
            chat_id: process.env.CHAT_ID,
            text: message
        });
    } catch (err) {
        console.error("Alert error:", err.message);
    }
}

module.exports = { sendAlert };