mirror of
https://github.com/diamondburned/arikawa.git
synced 2024-11-30 18:53:30 +00:00
Fixed bug where Guilds state is never populated
This commit is contained in:
parent
1c9b45e051
commit
7261cb2b68
|
@ -270,6 +270,11 @@ func (s *DefaultStore) Guild(id discord.Snowflake) (*discord.Guild, error) {
|
|||
func (s *DefaultStore) Guilds() ([]discord.Guild, error) {
|
||||
s.mut.Lock()
|
||||
|
||||
if len(s.guilds) == 0 {
|
||||
s.mut.Unlock()
|
||||
return nil, ErrStoreNotFound
|
||||
}
|
||||
|
||||
var gs = make([]discord.Guild, 0, len(s.guilds))
|
||||
for _, g := range s.guilds {
|
||||
gs = append(gs, *g)
|
||||
|
|
Loading…
Reference in a new issue