mirror of
https://github.com/diamondburned/arikawa.git
synced 2024-11-30 18:53:30 +00:00
State: Fixed DefaultStore's Channel() not finding DMs
This commit is contained in:
parent
22ef50c499
commit
69f8a5d6ec
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue