mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2024-11-21 09:36:35 +00:00
fix: 热重载容错
This commit is contained in:
parent
252358ed66
commit
26e224f852
@ -208,6 +208,7 @@ export class NapCatOnebot11 {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
async SetConfig(NewOb11: OB11Config) {
|
async SetConfig(NewOb11: OB11Config) {
|
||||||
|
try {
|
||||||
function isEqual(obj1: any, obj2: any) {
|
function isEqual(obj1: any, obj2: any) {
|
||||||
if (obj1 === obj2) return true;
|
if (obj1 === obj2) return true;
|
||||||
if (obj1 == null || obj2 == null) return false;
|
if (obj1 == null || obj2 == null) return false;
|
||||||
@ -272,6 +273,10 @@ export class NapCatOnebot11 {
|
|||||||
httpHeart.stop();
|
httpHeart.stop();
|
||||||
}
|
}
|
||||||
ob11Config.save(NewOb11);
|
ob11Config.save(NewOb11);
|
||||||
|
} catch (e) {
|
||||||
|
logError('热重载配置失败', e);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
async postGroupNotifies(notifies: GroupNotify[]) {
|
async postGroupNotifies(notifies: GroupNotify[]) {
|
||||||
for (const notify of notifies) {
|
for (const notify of notifies) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user