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 { fileURLToPath } from "url";
export const napcat_version = "2.0.0";
export class NapCatPathWrapper {
binaryPath: string;
logsPath: string;

View File

@ -1,16 +1,15 @@
import BaseAction from '../BaseAction';
import { OB11Version } 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;
protected async _handle(payload: any): Promise<any> {
return {
app_name: 'NapCat.Onebot',
protocol_version: 'v11',
app_version: version
app_version: napcat_version
};
}
}

View File

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