feat: 支持免配置调试

This commit is contained in:
手瓜一十雪 committed 2025-12-22 16:27:06 +08:00
1 parent 2a4ef581d7
commit c495ab5b46
11 files changed
+695 -34

No files matched your search

+5 -1
View File
@@ -455,7 +455,11 @@ export class NapCatShell {
async InitNapCat () {
await this.core.initCore();
new NapCatOneBot11Adapter(this.core, this.context, this.context.pathWrapper).InitOneBot()
const oneBotAdapter = new NapCatOneBot11Adapter(this.core, this.context, this.context.pathWrapper);
// 注册到 WebUiDataRuntime,供调试功能使用
WebUiDataRuntime.setOneBotContext(oneBotAdapter);
oneBotAdapter.InitOneBot()
.catch(e => this.context.logger.logError('初始化OneBot失败', e));
}
}