fix:将logAndNotifyUser用try包裹
This commit is contained in:
父節點
eb39fb1c04
當前提交
9567fbb889
@ -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) {
|
||||
|
載入中…
x
新增問題並參考
Block a user