From 9567fbb889cfa13baa1207bf3116e2d4d00931e9 Mon Sep 17 00:00:00 2001 From: juzeon <812312770@qq.com> Date: Mon, 12 Sep 2022 22:43:18 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E5=B0=86logAndNotifyUser=E7=94=A8t?= =?UTF-8?q?ry=E5=8C=85=E8=A3=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/includes.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/includes.ts b/src/includes.ts index c05847c..ba66517 100644 --- a/src/includes.ts +++ b/src/includes.ts @@ -43,10 +43,14 @@ export async function logAndNotifyUser(text: string) { // 'Content-Type': 'application/x-www-form-urlencoded' // } // }) - await axios.post('https://' + appConfig.tgApiDomain + '/bot' + appConfig.tgApiKey + '/sendMessage', qs.stringify({ - chat_id: appConfig.tgChatId, - text: text - })) + try { + await axios.post('https://' + appConfig.tgApiDomain + '/bot' + appConfig.tgApiKey + '/sendMessage', qs.stringify({ + chat_id: appConfig.tgChatId, + text: text + })) + } catch (e) { + console.log(e) + } } export function sleep(ms: number) {