Merge pull request #154 from b1naryth1ef/bugfix/guild-add-channels

Fix channels from a GUILD_CREATE packet having null GuildID's
This commit is contained in:
Bruce 2016-03-19 23:29:53 -05:00
commit c3b2a1b57d

View file

@ -73,6 +73,11 @@ func (s *State) GuildAdd(guild *Guild) error {
}
}
// Otherwise, update the channels to point to the right guild
for _, c := range guild.Channels {
c.GuildID = guild.ID
}
s.Guilds = append(s.Guilds, guild)
return nil
}