Skip to content

Commit

Permalink
fix: PrioritizedChatbot.Chat error when no chatbot available
Browse files Browse the repository at this point in the history
这个似乎就是 cdfmlr/muvtuber#29 的罪魁祸首。
  • Loading branch information
cdfmlr committed Apr 16, 2023
1 parent bc60d8b commit 41390d6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion chatbot/chatbot.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package chatbot

import (
"errors"
"log"
"muvtuberdriver/model"
"muvtuberdriver/pkg/ellipsis"
Expand Down Expand Up @@ -69,7 +70,7 @@ func (p *PrioritizedChatbot) Chat(textIn *model.TextIn) (*model.TextOut, error)
}
}

return nil, nil
return nil, errors.New("no chatbot available")
}

func NewPrioritizedChatbot(chatbots map[model.Priority]Chatbot) Chatbot {
Expand Down

0 comments on commit 41390d6

Please sign in to comment.