From 7e7887a936f6e05e4a64be98591642b1afaca2de Mon Sep 17 00:00:00 2001 From: andrei Date: Sat, 19 Mar 2016 18:58:47 -0700 Subject: [PATCH] Fix channels inside a guild from GUILD_CREATE having a null GuildID --- state.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/state.go b/state.go index 17033b2..901fd31 100644 --- a/state.go +++ b/state.go @@ -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 }