diff --git a/src/core/entities/msg.ts b/src/core/entities/msg.ts index f8bfeb09..4a6ae872 100644 --- a/src/core/entities/msg.ts +++ b/src/core/entities/msg.ts @@ -361,9 +361,17 @@ export interface TipAioOpGrayTipElement { * 群提示元素类型枚举 */ export enum TipGroupElementType { - memberIncrease = 1, - kicked = 3, // 被移出群 - ban = 8 + KUNKNOWN = 0, + KMEMBERADD = 1, + KDISBANDED = 2, + KQUITTE = 3, + KCREATED = 4, + KGROUPNAMEMODIFIED = 5, + KBLOCK = 6, + KUNBLOCK = 7, + KSHUTUP = 8, + KBERECYCLED = 9, + KDISBANDORBERECYCLED = 10 } /** @@ -380,11 +388,12 @@ export enum MemberAddShowType { K_YOU_ALREADY_MEMBER = 8, K_YOU_INVITE_OTHER = 7, } + /** * 群提示元素接口 */ export interface TipGroupElement { - type: TipGroupElementType; // 1表示有人加入群; 自己加入群也会收到这个 + type: TipGroupElementType; role: 0; groupName: string; memberUid: string; diff --git a/src/onebot/api/group.ts b/src/onebot/api/group.ts index c8124f8d..1fcccd79 100644 --- a/src/onebot/api/group.ts +++ b/src/onebot/api/group.ts @@ -50,13 +50,13 @@ export class OneBotGroupApi { for (const element of msg.elements) { if (element.grayTipElement?.groupElement) { const groupElement = element.grayTipElement.groupElement; - if (groupElement.type == TipGroupElementType.memberIncrease) { + if (groupElement.type == TipGroupElementType.KMEMBERADD) { const MemberIncreaseEvent = await this.obContext.apis.GroupApi.parseGroupMemberIncreaseEvent(msg.peerUid, element.grayTipElement); if (MemberIncreaseEvent) return MemberIncreaseEvent; - } else if (groupElement.type === TipGroupElementType.ban) { + } else if (groupElement.type === TipGroupElementType.KSHUTUP) { const BanEvent = await this.obContext.apis.GroupApi.parseGroupBanEvent(msg.peerUid, element.grayTipElement); if (BanEvent) return BanEvent; - } else if (groupElement.type == TipGroupElementType.kicked) { + } else if (groupElement.type == TipGroupElementType.KQUITTE) { this.core.apis.GroupApi.quitGroup(msg.peerUid).then(); try { const KickEvent = await this.obContext.apis.GroupApi.parseGroupKickEvent(msg.peerUid, element.grayTipElement);