fix:coerce

This commit is contained in:
手瓜一十雪
2025-04-15 12:25:37 +08:00
parent 6ded82d454
commit b190c21ef8
88 changed files with 277 additions and 276 deletions

View File

@@ -50,6 +50,7 @@ import {
import { OB11Message } from './types';
import { IOB11NetworkAdapter } from '@/onebot/network/adapter';
import { OB11HttpSSEServerAdapter } from './network/http-server-sse';
import { ZodType } from 'zod';
//OneBot实现类
export class NapCatOneBot11Adapter {
@@ -66,7 +67,7 @@ export class NapCatOneBot11Adapter {
constructor(core: NapCatCore, context: InstanceContext, pathWrapper: NapCatPathWrapper) {
this.core = core;
this.context = context;
this.configLoader = new OB11ConfigLoader(core, pathWrapper.configPath, OneBotConfigSchema);
this.configLoader = new OB11ConfigLoader(core, pathWrapper.configPath, OneBotConfigSchema as ZodType<OneBotConfig>);
this.apis = {
GroupApi: new OneBotGroupApi(this, core),
UserApi: new OneBotUserApi(this, core),