fix: TipGroupElementType

This commit is contained in:
手瓜一十雪
2024-11-21 14:10:52 +08:00
parent 5d884b600a
commit f2ddcdefd2
2 changed files with 16 additions and 7 deletions

View File

@@ -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);