Skip to content

Commit

Permalink
set unset member guild id on unmarshal
Browse files Browse the repository at this point in the history
  • Loading branch information
topi314 committed Aug 16, 2023
1 parent 49ab66b commit 6d891ab
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions discord/message.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,10 @@ func (m *Message) UnmarshalJSON(data []byte) error {
}
}

if m.Member != nil && m.GuildID != nil {
m.Member.GuildID = *m.GuildID
}

return nil
}

Expand Down

0 comments on commit 6d891ab

Please sign in to comment.