Update telegram.ts
This commit is contained in:
parent
039181afe4
commit
044fc276af
@ -1,4 +1,5 @@
|
|||||||
import fetch from 'node-fetch'
|
import fetch from 'node-fetch'
|
||||||
|
|
||||||
export async function sendToTelegram(text: string) {
|
export async function sendToTelegram(text: string) {
|
||||||
const URL = `https://api.telegram.org/bot${process.env.TELEGRAM_TOKEN}/sendMessage`
|
const URL = `https://api.telegram.org/bot${process.env.TELEGRAM_TOKEN}/sendMessage`
|
||||||
const body = `chat_id=${process.env.TELEGRAM_CHAT_ID}&text=${text}`
|
const body = `chat_id=${process.env.TELEGRAM_CHAT_ID}&text=${text}`
|
||||||
|
Loading…
Reference in New Issue
Block a user