Update some comments.

This commit is contained in:
Chris Rhodes 2016-04-10 16:20:14 -07:00
parent fa63c00fa2
commit 4e16cfef0e

View file

@ -58,11 +58,12 @@ func (s *State) GuildAdd(guild *Guild) error {
return ErrNilState
}
// Otherwise, update the channels to point to the right guild
// Update the channels to point to the right guild
for _, c := range guild.Channels {
c.GuildID = guild.ID
}
// If the guild exists, replace it.
if g, err := s.Guild(guild.ID); err == nil {
s.Lock()
defer s.Unlock()
@ -215,6 +216,7 @@ func (s *State) ChannelAdd(channel *Channel) error {
return ErrNilState
}
// If the channel exists, replace it.
if c, err := s.Channel(channel.ID); err == nil {
s.Lock()
defer s.Unlock()