瀏覽代碼

Update some comments.

Chris Rhodes 8 年之前
父節點
當前提交
4e16cfef0e
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      state.go

+ 3 - 1
state.go

@@ -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()