State: fix State.Message not working when the message's channel is not found in the Store (#117)

* State: fix State.Message not working when the message's channel is not found in the Store

* State: fix State.Message not working when the message's channel is not found in the Store
This commit is contained in:
Maximilian von Lindern 2020-06-08 16:30:16 +02:00 committed by GitHub
parent de3d0e2160
commit 1373e42fe1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -437,9 +437,9 @@ func (s *State) Message(channelID, messageID discord.Snowflake) (*discord.Messag
if cerr != nil {
wg.Add(1)
go func() {
c, err = s.Session.Channel(channelID)
if err == nil {
err = s.Store.ChannelSet(c)
c, cerr = s.Session.Channel(channelID)
if cerr == nil {
cerr = s.Store.ChannelSet(c)
}
wg.Done()