mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2025-07-19 12:03:37 +00:00
chore: version Api
This commit is contained in:
@@ -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;
|
||||||
|
@@ -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
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -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;
|
||||||
|
Reference in New Issue
Block a user