mirror of
https://github.com/LLOneBot/LLOneBot.git
synced 2024-11-22 01:56:33 +00:00

# Conflicts: # src/common/utils.ts # src/global.d.ts # src/main/ipcsend.ts # src/main/main.ts # src/ntqqapi/hook.ts # src/onebot11/action/SendMsg.ts # src/onebot11/action/TestForwdMsg.ts # src/onebot11/action/types.ts # src/onebot11/server.ts # src/preload.ts
14 lines
349 B
TypeScript
14 lines
349 B
TypeScript
import {webContents} from 'electron';
|
|
|
|
|
|
function sendIPCMsg(channel: string, ...data: any) {
|
|
let contents = webContents.getAllWebContents();
|
|
for (const content of contents) {
|
|
try {
|
|
content.send(channel, ...data)
|
|
} catch (e) {
|
|
console.log("llonebot send ipc msg to render error:", e)
|
|
}
|
|
}
|
|
}
|