feat: mail telegram and cron check

This commit is contained in:
opencode committed 2026-10-18 10:35:07 +02:00
1 parent 6e1d0a7568
commit 8b33242db1
6 files changed
+180

No files matched your search

+10
View File
@@ -0,0 +1,10 @@
export async function sendTelegram(chatId: string, text: string): Promise<void> {
const token = process.env.TELEGRAM_BOT_TOKEN;
if (!token) throw new Error("TELEGRAM_BOT_TOKEN fehlt");
const res = await fetch(`https://api.telegram.org/bot${token}/sendMessage`, {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({ chat_id: chatId, text }),
});
if (!res.ok) throw new Error(`Telegram ${res.status}`);
}