Browse Source

Set the GuildID for Members and VoiceStates on ready.

Chris Rhodes 8 years ago
parent
commit
1bc3fb9cd7
1 changed files with 8 additions and 0 deletions
  1. 8 0
      state.go

+ 8 - 0
state.go

@@ -625,6 +625,14 @@ func (s *State) onReady(se *Session, r *Ready) (err error) {
 			c.GuildID = g.ID
 			s.channelMap[c.ID] = c
 		}
+
+		for _, m := range g.Members {
+			m.GuildID = g.ID
+		}
+
+		for _, vs := range g.VoiceStates {
+			vs.GuildID = g.ID
+		}
 	}
 
 	for _, c := range s.PrivateChannels {