From cc8e8f108bab501d9318b3dd3283696bde2fbee9 Mon Sep 17 00:00:00 2001 From: linyuchen Date: Wed, 6 Mar 2024 22:02:11 +0800 Subject: [PATCH] docs: update readme, file msg add new field `name` --- README.md | 3 ++- src/main/main.ts | 6 +++--- src/ntqqapi/types.ts | 24 ++++++++++++++++++++++++ 3 files changed, 29 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 613f3d8..7029d95 100644 --- a/README.md +++ b/README.md @@ -92,7 +92,8 @@ wget -O fastboot.sh https://cdn.jsdelivr.net/gh/LLOneBot/llonebot-docker/fastboo { "type": "file", "data": { - "file": "file:///D:/1.txt" + "file": "file:///D:/1.txt", + "name": "自定义显示的文件名" // 此字段不是必须的 } } ``` diff --git a/src/main/main.ts b/src/main/main.ts index bc3554a..c0e49a0 100644 --- a/src/main/main.ts +++ b/src/main/main.ts @@ -282,9 +282,9 @@ function onLoad() { log("获取群通知的成员信息失败", notify, getGroup(notify.group.groupCode)); } } else if (notify.type == GroupNotifyTypes.MEMBER_EXIT) { - log("有成员退出通知"); - const member1 = await getGroupMember(notify.group.groupCode, null, notify.user1.uid); - let groupDecreaseEvent = new OB11GroupDecreaseEvent(parseInt(notify.group.groupCode), parseInt(member1.uin)) + // log("有成员退出通知"); + // const member1 = await getGroupMember(notify.group.groupCode, null, notify.user1.uid); + // let groupDecreaseEvent = new OB11GroupDecreaseEvent(parseInt(notify.group.groupCode), parseInt(member1.uin)) // postEvent(groupDecreaseEvent, true); } else if ([GroupNotifyTypes.JOIN_REQUEST].includes(notify.type)) { log("有加群请求"); diff --git a/src/ntqqapi/types.ts b/src/ntqqapi/types.ts index a3c2624..668f99a 100644 --- a/src/ntqqapi/types.ts +++ b/src/ntqqapi/types.ts @@ -283,6 +283,30 @@ export interface TipAioOpGrayTipElement{ fromGrpCodeOfTmpChat: string, } +export interface TipGroupElement { + "type": 1, // 1是表示有人加入群, 自己加入群也会收到这个 + "role": 0, + "groupName": string, // 暂时获取不到 + "memberUid": string, + "memberNick": string, + "memberRemark": string, + "adminUid": string, // 同意加群的管理员uid + "adminNick": string, + "adminRemark": string, + "createGroup": null, + "memberAdd": { + "showType": 1, + "otherAdd": null, + "otherAddByOtherQRCode": null, + "otherAddByYourQRCode": null, + "youAddByOtherQRCode": null, + "otherInviteOther": null, + "otherInviteYou": null, + "youInviteOther": null + }, + "shutUp": null +} + export interface RawMessage { msgId: string;