Skip to content

Commit

Permalink
✏️ 词库小修改
Browse files Browse the repository at this point in the history
  • Loading branch information
kanrichan committed Apr 23, 2021
1 parent d3d2dfc commit 7421fcb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Binary file added atri/RocketPunch.amr
Binary file not shown.
14 changes: 12 additions & 2 deletions atri/atri.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
ctx.SendChain(randText("萝卜子是对机器人的蔑称!", "是亚托莉......萝卜子可是对机器人的蔑称"))
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) {
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 7421fcb

Please sign in to comment.