fix gs tts

This commit is contained in:
源文雨
2022-12-03 17:16:45 +08:00
parent 82608d01bb
commit 11f358bcbf
3 changed files with 22 additions and 10 deletions

View File

@@ -54,7 +54,9 @@ func init() {
ctx.SendChain(message.Text("ERROR: plugin tts not found"))
return
}
var key string
var key struct {
APIKey string
}
gid := ctx.Event.GroupID
if gid == 0 {
gid = -ctx.Event.UserID
@@ -64,6 +66,6 @@ func init() {
ctx.SendChain(message.Text("ERROR: ", err))
return
}
ctx.SendChain(message.Record(fmt.Sprintf(cnapi, url.QueryEscape(text), id, key)))
ctx.SendChain(message.Record(fmt.Sprintf(cnapi, url.QueryEscape(text), id, url.QueryEscape(key.APIKey))))
})
}