fix:将logAndNotifyUser用try包裹

This commit is contained in:
juzeon 2022-09-12 22:43:18 +08:00
父節點 eb39fb1c04
當前提交 9567fbb889

查看文件

@ -43,10 +43,14 @@ export async function logAndNotifyUser(text: string) {
// 'Content-Type': 'application/x-www-form-urlencoded' // 'Content-Type': 'application/x-www-form-urlencoded'
// } // }
// }) // })
await axios.post('https://' + appConfig.tgApiDomain + '/bot' + appConfig.tgApiKey + '/sendMessage', qs.stringify({ try {
chat_id: appConfig.tgChatId, await axios.post('https://' + appConfig.tgApiDomain + '/bot' + appConfig.tgApiKey + '/sendMessage', qs.stringify({
text: text chat_id: appConfig.tgChatId,
})) text: text
}))
} catch (e) {
console.log(e)
}
} }
export function sleep(ms: number) { export function sleep(ms: number) {