Update some comments.
This commit is contained in:
parent
fa63c00fa2
commit
4e16cfef0e
1 changed files with 3 additions and 1 deletions
4
state.go
4
state.go
|
@ -58,11 +58,12 @@ func (s *State) GuildAdd(guild *Guild) error {
|
||||||
return ErrNilState
|
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 {
|
for _, c := range guild.Channels {
|
||||||
c.GuildID = guild.ID
|
c.GuildID = guild.ID
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If the guild exists, replace it.
|
||||||
if g, err := s.Guild(guild.ID); err == nil {
|
if g, err := s.Guild(guild.ID); err == nil {
|
||||||
s.Lock()
|
s.Lock()
|
||||||
defer s.Unlock()
|
defer s.Unlock()
|
||||||
|
@ -215,6 +216,7 @@ func (s *State) ChannelAdd(channel *Channel) error {
|
||||||
return ErrNilState
|
return ErrNilState
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If the channel exists, replace it.
|
||||||
if c, err := s.Channel(channel.ID); err == nil {
|
if c, err := s.Channel(channel.ID); err == nil {
|
||||||
s.Lock()
|
s.Lock()
|
||||||
defer s.Unlock()
|
defer s.Unlock()
|
||||||
|
|
Loading…
Reference in a new issue