mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2025-12-20 06:20:08 +08:00
✏️ 词库小修改
This commit is contained in:
parent
55e5f645fa
commit
65beaa5a41
BIN
atri/RocketPunch.amr
Normal file
BIN
atri/RocketPunch.amr
Normal file
Binary file not shown.
12
atri/atri.go
12
atri/atri.go
@ -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 {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user