diff --git a/src/core/types/element.ts b/src/core/types/element.ts index 1f6f057c..36c0f621 100644 --- a/src/core/types/element.ts +++ b/src/core/types/element.ts @@ -88,7 +88,7 @@ export interface GrayTipElement { templId: string; }; jsonGrayTipElement: { - busiId?: number | string; + busiId: string; jsonStr: string; recentAbstract?: string; isServer?: boolean; diff --git a/src/onebot/api/group.ts b/src/onebot/api/group.ts index 1be81313..8a4e1b6b 100644 --- a/src/onebot/api/group.ts +++ b/src/onebot/api/group.ts @@ -351,11 +351,11 @@ export class OneBotGroupApi { } } else if (grayTipElement.subElementType === NTGrayTipElementSubTypeV2.GRAYTIP_ELEMENT_SUBTYPE_JSON) { // 解析json事件 busiId好像是string类型的? - if (grayTipElement.jsonGrayTipElement.busiId?.toString() === '1061') { + if (grayTipElement.jsonGrayTipElement.busiId === '1061') { return await this.parsePaiYiPai(msg, grayTipElement.jsonGrayTipElement.jsonStr); - } else if (grayTipElement.jsonGrayTipElement.busiId === JsonGrayBusiId.AIO_GROUP_ESSENCE_MSG_TIP) { + } else if (grayTipElement.jsonGrayTipElement.busiId === JsonGrayBusiId.AIO_GROUP_ESSENCE_MSG_TIP.toString()) { return await this.parseEssenceMsg(msg, grayTipElement.jsonGrayTipElement.jsonStr); - } else if ((grayTipElement.jsonGrayTipElement.busiId ?? 0).toString() === '51') { + } else if (grayTipElement.jsonGrayTipElement.busiId === '51') { // 51是什么?{"align":"center","items":[{"txt":"下一秒起床通过王者荣耀加入群","type":"nor"}] return await this.parse51TypeEvent(msg, grayTipElement); } else {