File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ import (
16
16
const (
17
17
jpapi = "https://moegoe.azurewebsites.net/api/speak?text=%s&id=%d"
18
18
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 "
20
20
)
21
21
22
22
var speakers = map [string ]uint {
@@ -46,8 +46,8 @@ func init() {
46
46
})
47
47
en .OnRegex ("^让(派蒙|凯亚|安柏|丽莎|琴|香菱|枫原万叶|迪卢克|温迪|可莉|早柚|托马|芭芭拉|优菈|云堇|钟离|魈|凝光|雷电将军|北斗|甘雨|七七|刻晴|神里绫华|雷泽|神里绫人|罗莎莉亚|阿贝多|八重神子|宵宫|荒泷一斗|九条裟罗|夜兰|珊瑚宫心海|五郎|达达利亚|莫娜|班尼特|申鹤|行秋|烟绯|久岐忍|辛焱|砂糖|胡桃|重云|菲谢尔|诺艾尔|迪奥娜|鹿野院平藏)说([A-Za-z\\ s\\ d\u3131 -\u3163 \uac00 -\ud7ff .。,,、::;;!!??]+)$" ).Limit (ctxext .LimitByGroup ).SetBlock (true ).
48
48
Handle (func (ctx * zero.Ctx ) {
49
+ speaker := ctx .State ["regex_matched" ].([]string )[1 ]
49
50
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 ))))
52
52
})
53
53
}
You can’t perform that action at this time.
0 commit comments