chore: version Api

This commit is contained in:
手瓜一十雪
2024-08-09 16:35:28 +08:00
parent 24a166cb94
commit c2e28ab5a6
3 changed files with 4 additions and 7 deletions

View File

@@ -1,6 +1,6 @@
import path, { dirname } from "path"; import path, { dirname } from "path";
import { fileURLToPath } from "url"; import { fileURLToPath } from "url";
export const napcat_version = "2.0.0";
export class NapCatPathWrapper { export class NapCatPathWrapper {
binaryPath: string; binaryPath: string;
logsPath: string; logsPath: string;

View File

@@ -1,16 +1,15 @@
import BaseAction from '../BaseAction'; import BaseAction from '../BaseAction';
import { OB11Version } from '../../types';
import { ActionName } from '../types'; import { ActionName } from '../types';
import { version } from '@/onebot/version'; import { napcat_version } from '@/common/framework/napcat';
export default class GetVersionInfo extends BaseAction<any, OB11Version> { export default class GetVersionInfo extends BaseAction<any, any> {
actionName = ActionName.GetVersionInfo; actionName = ActionName.GetVersionInfo;
protected async _handle(payload: any): Promise<any> { protected async _handle(payload: any): Promise<any> {
return { return {
app_name: 'NapCat.Onebot', app_name: 'NapCat.Onebot',
protocol_version: 'v11', protocol_version: 'v11',
app_version: version app_version: napcat_version
}; };
} }
} }

View File

@@ -1,8 +1,6 @@
import { NapCatCore, InstanceContext } from "@/core"; import { NapCatCore, InstanceContext } from "@/core";
//OneBot实现类 //OneBot实现类
export class NapCatOneBot11Adapter { export class NapCatOneBot11Adapter {
readonly core: NapCatCore; readonly core: NapCatCore;
readonly context: InstanceContext; readonly context: InstanceContext;