✏️ 词库小修改

This commit is contained in:
Yiwen-Chan 2021-04-23 23:52:24 +08:00
parent 55e5f645fa
commit 65beaa5a41
2 changed files with 12 additions and 2 deletions

BIN
atri/RocketPunch.amr Normal file

Binary file not shown.

View File

@ -28,9 +28,14 @@ func init() { // 插件主体
ENABLE = false
ctx.SendChain(randText("Zzz……Zzz……"))
})
zero.OnKeywordGroup([]string{"萝卜子"}, AtriSwitch(), AtriSleep()).SetBlock(true).SetPriority(PRIO).
zero.OnFullMatch("萝卜子", AtriSwitch(), AtriSleep()).SetBlock(true).SetPriority(PRIO).
Handle(func(ctx *zero.Ctx) {
switch rand.Intn(2) {
case 0:
ctx.SendChain(randText("萝卜子是对机器人的蔑称!", "是亚托莉......萝卜子可是对机器人的蔑称"))
case 1:
ctx.SendChain(randRecord("RocketPunch.amr"))
}
})
zero.OnKeywordGroup([]string{"喜欢", "爱你", "爱", "suki", "daisuki", "すき", "好き", "贴贴", "老婆", "亲一个", "mua"}, AtriSwitch(), AtriSleep(), zero.OnlyToMe).SetBlock(true).SetPriority(PRIO).
Handle(func(ctx *zero.Ctx) {
@ -220,6 +225,11 @@ func randImage(file ...string) message.MessageSegment {
return message.Image(RES + file[rand.Intn(length)])
}
func randRecord(file ...string) message.MessageSegment {
length := len(file)
return message.Image(RES + file[rand.Intn(length)])
}
// AtriSwitch 控制 ATRI 的开关
func AtriSwitch() zero.Rule {
return func(ctx *zero.Ctx) bool {