Skip to content

Commit dd3ccf1

Browse files
committed
🐛 moegoe Chinese
1 parent 52a7977 commit dd3ccf1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

plugin/moegoe/main.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import (
1616
const (
1717
jpapi = "https://moegoe.azurewebsites.net/api/speak?text=%s&id=%d"
1818
krapi = "https://moegoe.azurewebsites.net/api/speakkr?text=%s&id=%d"
19-
cnapi = "http://233366.proxy.nscc-gz.cn:8888?speaker=%s&text=%d"
19+
cnapi = "http://233366.proxy.nscc-gz.cn:8888?speaker=%s&text=%s"
2020
)
2121

2222
var speakers = map[string]uint{
@@ -46,8 +46,8 @@ func init() {
4646
})
4747
en.OnRegex("^让(派蒙|凯亚|安柏|丽莎|琴|香菱|枫原万叶|迪卢克|温迪|可莉|早柚|托马|芭芭拉|优菈|云堇|钟离|魈|凝光|雷电将军|北斗|甘雨|七七|刻晴|神里绫华|雷泽|神里绫人|罗莎莉亚|阿贝多|八重神子|宵宫|荒泷一斗|九条裟罗|夜兰|珊瑚宫心海|五郎|达达利亚|莫娜|班尼特|申鹤|行秋|烟绯|久岐忍|辛焱|砂糖|胡桃|重云|菲谢尔|诺艾尔|迪奥娜|鹿野院平藏)说([A-Za-z\\s\\d\u3131-\u3163\uac00-\ud7ff.。,,、::;;!!??]+)$").Limit(ctxext.LimitByGroup).SetBlock(true).
4848
Handle(func(ctx *zero.Ctx) {
49+
speaker := ctx.State["regex_matched"].([]string)[1]
4950
text := ctx.State["regex_matched"].([]string)[2]
50-
id := ctx.State["regex_matched"].([]string)[1]
51-
ctx.SendChain(message.Record(fmt.Sprintf(cnapi, url.QueryEscape(text), id)))
51+
ctx.SendChain(message.Record(fmt.Sprintf(cnapi, url.QueryEscape(speaker), url.QueryEscape(text))))
5252
})
5353
}

0 commit comments

Comments
 (0)