Skip to content

Commit

Permalink
fix(event): fix guild-member-added null operator field
Browse files Browse the repository at this point in the history
  • Loading branch information
ilharp committed Sep 18, 2024
1 parent b1bbadd commit 00c4688
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions packages/engine-chronocat-event/src/parser/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -258,10 +258,12 @@ async function parseGuildMemberAddedMessage(
)
event2.type = 'guild-member-added'

event2.operator = {
id: message.elements[0]!.grayTipElement!.groupElement!.adminUin!,
name: undefined as unknown as string,
}
// TODO: 自行入群大概率没有这个 adminUin 的,之后测下
if (message.elements[0]!.grayTipElement!.groupElement!.adminUin)
event2.operator = {
id: message.elements[0]!.grayTipElement!.groupElement!.adminUin!,
name: undefined as unknown as string,
}

event2.user = {
id: message.elements[0]!.grayTipElement!.groupElement!.memberUin!,
Expand Down

0 comments on commit 00c4688

Please sign in to comment.