This commit is contained in:
手瓜一十雪
2025-02-04 18:09:30 +08:00
parent f1c248e9f5
commit c308b6aef6
6 changed files with 60 additions and 55 deletions

View File

@@ -78,7 +78,7 @@ const NetworkConfigSchema = Type.Object({
plugins: Type.Array(PluginConfigSchema, { default: [] })
}, { default: {} });
const OneBotConfigSchema = Type.Object({
export const OneBotConfigSchema = Type.Object({
network: NetworkConfigSchema,
musicSignUrl: Type.String({ default: '' }),
enableLocalFile2Url: Type.Boolean({ default: false }),

View File

@@ -1,9 +1,10 @@
import { ConfigBase } from '@/common/config-base';
import { NapCatCore } from '@/core';
import { OneBotConfig } from './config';
import { AnySchema } from 'ajv';
export class OB11ConfigLoader extends ConfigBase<OneBotConfig> {
constructor(core: NapCatCore, configPath: string) {
super('onebot11', core, configPath, false);
constructor(core: NapCatCore, configPath: string, schema: AnySchema) {
super('onebot11', core, configPath, schema);
}
}