diff --git a/state/store.go b/state/store.go index 87221e7..4979e8b 100644 --- a/state/store.go +++ b/state/store.go @@ -24,6 +24,7 @@ type Store interface { type StoreGetter interface { Me() (*discord.User, error) + // Channel should check for both DM and guild channels. Channel(id discord.Snowflake) (*discord.Channel, error) Channels(guildID discord.Snowflake) ([]discord.Channel, error) PrivateChannels() ([]discord.Channel, error) diff --git a/state/store_default.go b/state/store_default.go index 1997cfe..889a420 100644 --- a/state/store_default.go +++ b/state/store_default.go @@ -99,6 +99,10 @@ func (s *DefaultStore) Channel(id discord.Snowflake) (*discord.Channel, error) { } } + if ch, ok := s.privates[id]; ok { + return ch, nil + } + return nil, ErrStoreNotFound }