From 195c3e72f3ab7bf26e37b316bf949461ea46973b Mon Sep 17 00:00:00 2001 From: lxk0301 <778732665@qq.com> Date: Tue, 16 Mar 2021 14:21:10 +0800 Subject: [PATCH] update --- sendNotify.js | 1 + 1 file changed, 1 insertion(+) diff --git a/sendNotify.js b/sendNotify.js index eebcbbaa..6b702a0d 100644 --- a/sendNotify.js +++ b/sendNotify.js @@ -309,6 +309,7 @@ function BarkNotify(text, desp, params={}) { function tgBotNotify(text, desp) { return new Promise(resolve => { if (TG_BOT_TOKEN && TG_USER_ID) { + desp = `${desp.replace("_", "\\_")}`;//支持markdown后,带有_会导致推送失败,转义一下 const options = { url: `https://${TG_API_HOST}/bot${TG_BOT_TOKEN}/sendMessage`, body: `chat_id=${TG_USER_ID}&text=${text}\n\n${desp}&disable_web_page_preview=true&parse_mode=Markdown`,