mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2024-11-21 09:36:35 +00:00
chore: 移除无用代码
This commit is contained in:
parent
b3c1eff137
commit
4b6cde786e
4
src/nwebui/Readme.md
Normal file
4
src/nwebui/Readme.md
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
# NewWebui
|
||||||
|
基于Vue3实现的现代化轻量化NapCat管理面板
|
||||||
|
## 进度
|
||||||
|
画饼
|
@ -1,20 +0,0 @@
|
|||||||
import BaseAction from '../BaseAction';
|
|
||||||
import { OB11Config, ob11Config } from '@/onebot11/config';
|
|
||||||
import { ActionName } from '../types';
|
|
||||||
|
|
||||||
|
|
||||||
export class GetConfigAction extends BaseAction<null, OB11Config> {
|
|
||||||
actionName = ActionName.GetConfig;
|
|
||||||
|
|
||||||
protected async _handle(payload: null): Promise<OB11Config> {
|
|
||||||
return ob11Config;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export class SetConfigAction extends BaseAction<OB11Config, void> {
|
|
||||||
actionName = ActionName.SetConfig;
|
|
||||||
|
|
||||||
protected async _handle(payload: OB11Config): Promise<void> {
|
|
||||||
ob11Config.save(payload, true);
|
|
||||||
}
|
|
||||||
}
|
|
@ -24,12 +24,12 @@ export class GoCQHTTPGetForwardMsgAction extends BaseAction<Payload, any> {
|
|||||||
actionName = ActionName.GoCQHTTP_GetForwardMsg;
|
actionName = ActionName.GoCQHTTP_GetForwardMsg;
|
||||||
PayloadSchema = SchemaData;
|
PayloadSchema = SchemaData;
|
||||||
protected async _handle(payload: Payload): Promise<any> {
|
protected async _handle(payload: Payload): Promise<any> {
|
||||||
const msgId = payload.message_id || payload.id;
|
const msgIdMixOb11Id = payload.message_id || payload.id;
|
||||||
if (!msgId) {
|
if (!msgIdMixOb11Id) {
|
||||||
throw Error('message_id is required');
|
throw Error('message_id or id is required');
|
||||||
}
|
}
|
||||||
const rootMsgId = MessageUnique.getShortIdByMsgId(msgId);
|
const rootMsgId = MessageUnique.getShortIdByMsgId(msgIdMixOb11Id);
|
||||||
const rootMsg = MessageUnique.getMsgIdAndPeerByShortId(rootMsgId || parseInt(msgId));
|
const rootMsg = MessageUnique.getMsgIdAndPeerByShortId(rootMsgId || parseInt(msgIdMixOb11Id));
|
||||||
if (!rootMsg) {
|
if (!rootMsg) {
|
||||||
throw Error('msg not found');
|
throw Error('msg not found');
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,4 @@
|
|||||||
import fs from 'node:fs';
|
|
||||||
import path from 'node:path';
|
|
||||||
import { selfInfo } from '@/core/data';
|
|
||||||
import { logDebug, logError } from '@/common/utils/log';
|
|
||||||
import { ConfigBase } from '@/common/utils/ConfigBase';
|
import { ConfigBase } from '@/common/utils/ConfigBase';
|
||||||
import { json } from 'stream/consumers';
|
|
||||||
|
|
||||||
export interface OB11Config {
|
export interface OB11Config {
|
||||||
http: {
|
http: {
|
||||||
enable: boolean;
|
enable: boolean;
|
||||||
@ -36,7 +30,7 @@ export interface OB11Config {
|
|||||||
Record: boolean,
|
Record: boolean,
|
||||||
RecordList: Array<string>
|
RecordList: Array<string>
|
||||||
},
|
},
|
||||||
read(): OB11Config;
|
read(): OB11Config | null;
|
||||||
|
|
||||||
save(config: OB11Config): void;
|
save(config: OB11Config): void;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user