merge v3.4.0

This commit is contained in:
linyuchen 2024-02-20 16:12:46 +08:00
parent ed48a76c33
commit 0e4de038ca
3 changed files with 17 additions and 23 deletions

View File

@ -1,18 +1,21 @@
// 运行在 Electron 主进程 下的插件入口
import {BrowserWindow, ipcMain} from 'electron';
import fs from 'fs';
import {Config} from "../common/types";
import {CHANNEL_GET_CONFIG, CHANNEL_LOG, CHANNEL_SET_CONFIG,} from "../common/channels";
import { postMsg, setToken, startHTTPServer, startWSServer } from "../onebot11/server";
import {initWebsocket, postMsg} from "../onebot11/server";
import {CONFIG_DIR, getConfigUtil, log} from "../common/utils";
import { addHistoryMsg, getGroupMember, msgHistory, selfInfo, uidMaps } from "../common/data";
import { hookNTQQApiReceive, ReceiveCmd, registerReceiveHook } from "../ntqqapi/hook";
import {addHistoryMsg, getGroupMember, msgHistory, selfInfo} from "../common/data";
import {hookNTQQApiCall, hookNTQQApiReceive, ReceiveCmd, registerReceiveHook} from "../ntqqapi/hook";
import {OB11Constructor} from "../onebot11/constructor";
import {NTQQApi} from "../ntqqapi/ntcall";
import {ChatType, RawMessage} from "../ntqqapi/types";
import {ob11HTTPServer} from "../onebot11/server/http";
import {OB11FriendRecallNoticeEvent} from "../onebot11/event/notice/OB11FriendRecallNoticeEvent";
import {OB11GroupRecallNoticeEvent} from "../onebot11/event/notice/OB11GroupRecallNoticeEvent";
const fs = require('fs');
let running = false;
@ -34,8 +37,7 @@ function onLoad() {
}
if (!arg.ob11.enableHttp) {
ob11HTTPServer.stop()
}
else{
} else {
ob11HTTPServer.start(arg.ob11.httpPort);
}
if (arg.ob11.wsPort != oldConfig.ob11.wsPort) {

View File

@ -1,10 +1,4 @@
import {BrowserWindow} from 'electron';
import { log } from "../common/utils";
import { NTQQApi, NTQQApiClass, sendMessagePool } from "./ntcall";
import { Group, RawMessage, User } from "./types";
import { addHistoryMsg, friends, groups, msgHistory } from "../common/data";
import { v4 as uuidv4 } from 'uuid';
import {BrowserWindow} from 'electron';
import {log, sleep} from "../common/utils";
import {NTQQApi, NTQQApiClass, sendMessagePool} from "./ntcall";
import {Group, RawMessage, User} from "./types";

View File

@ -14,10 +14,8 @@ import GetVersionInfo from "./GetVersionInfo";
import CanSendRecord from "./CanSendRecord";
import CanSendImage from "./CanSendImage";
import GetStatus from "./GetStatus";
import TestForwardMsg from "./TestForwdMsg";
export const actionHandlers = [
new TestForwardMsg(),
new GetMsg(),
new GetLoginInfo(),
new GetFriendList(),