fix: 热重载容错

This commit is contained in:
手瓜一十雪 2024-05-17 21:44:52 +08:00
parent 252358ed66
commit 26e224f852

View File

@ -208,6 +208,7 @@ export class NapCatOnebot11 {
}
}
async SetConfig(NewOb11: OB11Config) {
try {
function isEqual(obj1: any, obj2: any) {
if (obj1 === obj2) return true;
if (obj1 == null || obj2 == null) return false;
@ -272,6 +273,10 @@ export class NapCatOnebot11 {
httpHeart.stop();
}
ob11Config.save(NewOb11);
} catch (e) {
logError('热重载配置失败', e);
}
}
async postGroupNotifies(notifies: GroupNotify[]) {
for (const notify of notifies) {