This commit is contained in:
tangyanbiao 2021-12-27 10:50:27 +08:00
commit 5205ba8bab
2 changed files with 3 additions and 2 deletions

View File

@ -1,4 +1,5 @@
import fetch from 'node-fetch'
export async function sendToTelegram(text: string) {
const URL = `https://api.telegram.org/bot${process.env.TELEGRAM_TOKEN}/sendMessage`
const body = `chat_id=${process.env.TELEGRAM_CHAT_ID}&text=${text}`