Merge branch 'develop' of https://github.com/bwmarrin/Discordgo into develop
This commit is contained in:
commit
df818b5931
1 changed files with 3 additions and 0 deletions
3
state.go
3
state.go
|
@ -325,6 +325,9 @@ func (s *State) Channel(channelID string) (*Channel, error) {
|
||||||
return nil, ErrNilState
|
return nil, ErrNilState
|
||||||
}
|
}
|
||||||
|
|
||||||
|
s.RLock()
|
||||||
|
defer s.RUnlock()
|
||||||
|
|
||||||
if c, ok := s.channelMap[channelID]; ok {
|
if c, ok := s.channelMap[channelID]; ok {
|
||||||
return c, nil
|
return c, nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue