mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2024-11-16 13:01:14 +00:00
build: 1.3.5-beta24
This commit is contained in:
parent
96ec149a98
commit
e506f50b00
@ -142,16 +142,16 @@ export function postOB11Event(msg: PostEventType, reportSelf = false, postWs = t
|
|||||||
}
|
}
|
||||||
replyMessage = replyMessage.concat(normalize(reply, resJson.auto_escape));
|
replyMessage = replyMessage.concat(normalize(reply, resJson.auto_escape));
|
||||||
const { sendElements, deleteAfterSentFiles } = await createSendElements(replyMessage, group);
|
const { sendElements, deleteAfterSentFiles } = await createSendElements(replyMessage, group);
|
||||||
sendMsg(peer, sendElements, deleteAfterSentFiles, false).then();
|
sendMsg(peer, sendElements, deleteAfterSentFiles, false).then().catch(logError);
|
||||||
} else if (resJson.delete) {
|
} else if (resJson.delete) {
|
||||||
NTQQMsgApi.recallMsg(peer, [rawMessage!.msgId]).then();
|
NTQQMsgApi.recallMsg(peer, [rawMessage!.msgId]).then().catch(logError);
|
||||||
} else if (resJson.kick) {
|
} else if (resJson.kick) {
|
||||||
NTQQGroupApi.kickMember(peer.peerUid, [rawMessage!.senderUid]).then();
|
NTQQGroupApi.kickMember(peer.peerUid, [rawMessage!.senderUid]).then().catch(logError);
|
||||||
} else if (resJson.ban) {
|
} else if (resJson.ban) {
|
||||||
NTQQGroupApi.banMember(peer.peerUid, [{
|
NTQQGroupApi.banMember(peer.peerUid, [{
|
||||||
uid: rawMessage!.senderUid,
|
uid: rawMessage!.senderUid,
|
||||||
timeStamp: resJson.ban_duration || 60 * 30
|
timeStamp: resJson.ban_duration || 60 * 30
|
||||||
}],).then();
|
}],).then().catch(logError);
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (msg.post_type === 'request') {
|
} else if (msg.post_type === 'request') {
|
||||||
@ -165,7 +165,7 @@ export function postOB11Event(msg: PostEventType, reportSelf = false, postWs = t
|
|||||||
NTQQFriendApi.handleFriendRequest(
|
NTQQFriendApi.handleFriendRequest(
|
||||||
request,
|
request,
|
||||||
!!resJson.approve,
|
!!resJson.approve,
|
||||||
).then();
|
).then().catch(logError);
|
||||||
}
|
}
|
||||||
} else if ((msg as OB11GroupRequestEvent).request_type === 'group') {
|
} else if ((msg as OB11GroupRequestEvent).request_type === 'group') {
|
||||||
resJson = resJson as QuickActionGroupRequest;
|
resJson = resJson as QuickActionGroupRequest;
|
||||||
@ -175,7 +175,7 @@ export function postOB11Event(msg: PostEventType, reportSelf = false, postWs = t
|
|||||||
// const [groupCode, seq] = flag.split('|');
|
// const [groupCode, seq] = flag.split('|');
|
||||||
NTQQGroupApi.handleGroupRequest(request,
|
NTQQGroupApi.handleGroupRequest(request,
|
||||||
resJson.approve ? GroupRequestOperateTypes.approve : GroupRequestOperateTypes.reject
|
resJson.approve ? GroupRequestOperateTypes.approve : GroupRequestOperateTypes.reject
|
||||||
).then();
|
).then().catch(logError);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user