mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2025-12-19 13:59:39 +08:00
🎨 优化 moegoe KR
This commit is contained in:
parent
c7f7d0409e
commit
e5b712ff39
@ -20,7 +20,7 @@ const (
|
|||||||
|
|
||||||
var speakers = map[string]uint{
|
var speakers = map[string]uint{
|
||||||
"宁宁": 0, "爱瑠": 1, "芳乃": 2, "茉子": 3, "丛雨": 4, "小春": 5, "七海": 6,
|
"宁宁": 0, "爱瑠": 1, "芳乃": 2, "茉子": 3, "丛雨": 4, "小春": 5, "七海": 6,
|
||||||
"수아": 0, "미미르": 1, "아린": 2, "연화": 3, "유화": 4, "선배": 5,
|
"Sua": 0, "Mimiru": 1, "Arin": 2, "Yeonhwa": 3, "Yuhwa": 4, "Seonbae": 5,
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
@ -28,15 +28,15 @@ func init() {
|
|||||||
DisableOnDefault: false,
|
DisableOnDefault: false,
|
||||||
Help: "moegoe\n" +
|
Help: "moegoe\n" +
|
||||||
"- 让[宁宁|爱瑠|芳乃|茉子|丛雨|小春|七海]说(日语)\n" +
|
"- 让[宁宁|爱瑠|芳乃|茉子|丛雨|小春|七海]说(日语)\n" +
|
||||||
"- 让[수아|미미르|아린|연화|유화|선배]说(韩语)",
|
"- 让[Sua|Mimiru|Arin|Yeonhwa|Yuhwa|Seonbae]说(韩语)",
|
||||||
}).ApplySingle(ctxext.DefaultSingle)
|
}).ApplySingle(ctxext.DefaultSingle)
|
||||||
en.OnRegex("^让(宁宁|爱瑠|芳乃|茉子|丛雨|小春|七海)说([A-Za-z\\s\\d\u3005\u3040-\u30ff\u4e00-\u9fff\uff11-\uff19\uff21-\uff3a\uff41-\uff5a\uff66-\uff9d.。,,、::;;]+)$").Limit(ctxext.LimitByGroup).SetBlock(true).
|
en.OnRegex("^让(宁宁|爱瑠|芳乃|茉子|丛雨|小春|七海)说([A-Za-z\\s\\d\u3005\u3040-\u30ff\u4e00-\u9fff\uff11-\uff19\uff21-\uff3a\uff41-\uff5a\uff66-\uff9d.。,,、::;;!!??]+)$").Limit(ctxext.LimitByGroup).SetBlock(true).
|
||||||
Handle(func(ctx *zero.Ctx) {
|
Handle(func(ctx *zero.Ctx) {
|
||||||
text := ctx.State["regex_matched"].([]string)[2]
|
text := ctx.State["regex_matched"].([]string)[2]
|
||||||
id := speakers[ctx.State["regex_matched"].([]string)[1]]
|
id := speakers[ctx.State["regex_matched"].([]string)[1]]
|
||||||
ctx.SendChain(message.Record(fmt.Sprintf(jpapi, url.QueryEscape(text), id)))
|
ctx.SendChain(message.Record(fmt.Sprintf(jpapi, url.QueryEscape(text), id)))
|
||||||
})
|
})
|
||||||
en.OnRegex("^让(수아|미미르|아린|연화|유화|선배)说([A-Za-z\\s\\d\u3131-\u3163\uac00-\ud7ff.。,,、::;;]+)$").Limit(ctxext.LimitByGroup).SetBlock(true).
|
en.OnRegex("^让(Sua|Mimiru|Arin|Yeonhwa|Yuhwa|Seonbae)说([A-Za-z\\s\\d\u3131-\u3163\uac00-\ud7ff.。,,、::;;!!??]+)$").Limit(ctxext.LimitByGroup).SetBlock(true).
|
||||||
Handle(func(ctx *zero.Ctx) {
|
Handle(func(ctx *zero.Ctx) {
|
||||||
text := ctx.State["regex_matched"].([]string)[2]
|
text := ctx.State["regex_matched"].([]string)[2]
|
||||||
id := speakers[ctx.State["regex_matched"].([]string)[1]]
|
id := speakers[ctx.State["regex_matched"].([]string)[1]]
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user