Merge pull request #164 from iopred/develop

Prime the channel map correctly.
This commit is contained in:
Bruce 2016-04-12 11:49:15 -04:00
commit 6abc247a2d

View file

@ -41,11 +41,17 @@ func (s *State) OnReady(r *Ready) error {
s.Ready = *r
for _, g := range s.Guilds {
s.guildMap[g.ID] = g
for _, c := range g.Channels {
c.GuildID = g.ID
}
s.guildMap[g.ID] = g
s.channelMap[c.ID] = c
}
}
for _, c := range s.PrivateChannels {
s.channelMap[c.ID] = c
}
return nil