mirror of
https://github.com/LLOneBot/LLOneBot.git
synced 2024-11-22 01:56:33 +00:00
save
This commit is contained in:
@@ -38,11 +38,15 @@ export function hookNTQQApiReceive(window: BrowserWindow) {
|
||||
if (args?.[1] instanceof Array) {
|
||||
for (let receiveData of args?.[1]) {
|
||||
const ntQQApiMethodName = receiveData.cmdName;
|
||||
log(`received ntqq api message: ${channel} ${ntQQApiMethodName}`, JSON.stringify(receiveData))
|
||||
// log(`received ntqq api message: ${channel} ${ntQQApiMethodName}`, JSON.stringify(receiveData))
|
||||
for (let hook of receiveHooks) {
|
||||
if (hook.method === ntQQApiMethodName) {
|
||||
new Promise((resolve, reject) => {
|
||||
hook.hookFunc(receiveData.payload);
|
||||
try {
|
||||
hook.hookFunc(receiveData.payload);
|
||||
}catch (e) {
|
||||
log("hook error", e, receiveData.payload)
|
||||
}
|
||||
}).then()
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user