fix:将logAndNotifyUser用try包裹
This commit is contained in:
		| @@ -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) { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user