diff --git a/aireply/lolimi.go b/aireply/lolimi.go index 92b07d9..d80efb5 100644 --- a/aireply/lolimi.go +++ b/aireply/lolimi.go @@ -48,6 +48,9 @@ func (l *LolimiAi) TalkPlain(_ int64, msg, nickname string) string { return "ERROR: " + err.Error() } replystr := gjson.Get(binary.BytesToString(data), "data.output").String() + replystr = strings.ReplaceAll(replystr, "", "\n") + replystr = strings.ReplaceAll(replystr, "\" />", "]") textReply := strings.ReplaceAll(replystr, l.n, nickname) for _, w := range l.b { if strings.Contains(textReply, w) { diff --git a/tts/lolimi/api.go b/tts/lolimi/api.go index 2e53835..03183f5 100644 --- a/tts/lolimi/api.go +++ b/tts/lolimi/api.go @@ -2,6 +2,7 @@ package lolimi import ( "fmt" + "strings" "github.com/FloatTech/floatbox/binary" "github.com/FloatTech/floatbox/web" @@ -43,6 +44,7 @@ func TTS(name string, text string) (recURL string, err error) { data []byte ok bool ) + text = strings.ReplaceAll(text, " ", "") ttsURL, ok = lolimiMap[name] if !ok { ttsURL = fmt.Sprintf(genshinURL, text, name)