mirror of
https://github.com/LLOneBot/LLOneBot.git
synced 2024-11-22 01:56:33 +00:00
temp save
This commit is contained in:
@@ -18,7 +18,8 @@ export enum ReceiveCmd {
|
||||
GROUPS = "nodeIKernelGroupListener/onGroupListUpdate",
|
||||
GROUPS_UNIX = "onGroupListUpdate",
|
||||
FRIENDS = "onBuddyListChange",
|
||||
MEDIA_DOWNLOAD_COMPLETE = "nodeIKernelMsgListener/onRichMediaDownloadComplete"
|
||||
MEDIA_DOWNLOAD_COMPLETE = "nodeIKernelMsgListener/onRichMediaDownloadComplete",
|
||||
UNREAD_GROUP_NOTICE = "nodeIKernelGroupListener/onGroupNotifiesUnreadCountUpdated"
|
||||
}
|
||||
|
||||
interface NTQQApiReturnData<PayloadType = unknown> extends Array<any> {
|
||||
@@ -251,3 +252,10 @@ registerReceiveHook<{ msgRecord: RawMessage }>(ReceiveCmd.SELF_SEND_MSG, ({msgRe
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
registerReceiveHook<{"doubt": boolean,"oldestUnreadSeq": string,"unreadCount": number}>(ReceiveCmd.UNREAD_GROUP_NOTICE, (payload)=>{
|
||||
log("收到群通知", payload);
|
||||
if (payload.unreadCount){
|
||||
|
||||
}
|
||||
})
|
@@ -41,7 +41,8 @@ export enum NTQQApiMethod {
|
||||
RECALL_MSG = "nodeIKernelMsgService/recallMsg",
|
||||
SEND_MSG = "nodeIKernelMsgService/sendMsg",
|
||||
DOWNLOAD_MEDIA = "nodeIKernelMsgService/downloadRichMedia",
|
||||
MULTI_FORWARD_MSG = "nodeIKernelMsgService/multiForwardMsgWithComment" // 合并转发
|
||||
MULTI_FORWARD_MSG = "nodeIKernelMsgService/multiForwardMsgWithComment", // 合并转发
|
||||
GET_GROUP_NOTICE = "nodeIKernelGroupListener/onGroupSingleScreenNotifies",
|
||||
}
|
||||
|
||||
enum NTQQApiChannel {
|
||||
@@ -65,6 +66,7 @@ interface NTQQApiParams {
|
||||
methodName: NTQQApiMethod,
|
||||
className?: NTQQApiClass,
|
||||
channel?: NTQQApiChannel,
|
||||
classNameIsRegister?: boolean
|
||||
args?: unknown[],
|
||||
cbCmd?: ReceiveCmd | null,
|
||||
cmdCB?: (payload: any) => boolean;
|
||||
@@ -343,10 +345,11 @@ export class NTQQApi {
|
||||
methodName: NTQQApiMethod.DOWNLOAD_MEDIA,
|
||||
args: apiParams,
|
||||
cbCmd: ReceiveCmd.MEDIA_DOWNLOAD_COMPLETE,
|
||||
cmdCB:(payload: {notifyInfo: {filePath: string}})=>{
|
||||
cmdCB: (payload: { notifyInfo: { filePath: string } }) => {
|
||||
// log("media 下载完成判断", payload.notifyInfo.filePath, sourcePath);
|
||||
return payload.notifyInfo.filePath == sourcePath;
|
||||
}})
|
||||
}
|
||||
})
|
||||
return sourcePath
|
||||
}
|
||||
|
||||
@@ -397,6 +400,7 @@ export class NTQQApi {
|
||||
return reject("发送超时")
|
||||
}
|
||||
if (msgHistory[rawMessage.msgId]?.sendStatus == 2) {
|
||||
log(`给${peerUid}发送消息成功`)
|
||||
success = true;
|
||||
resolve(rawMessage);
|
||||
} else {
|
||||
@@ -407,6 +411,7 @@ export class NTQQApi {
|
||||
checkSendComplete();
|
||||
} else {
|
||||
success = true;
|
||||
log(`给${peerUid}发送消息成功`)
|
||||
resolve(rawMessage);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user