mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2025-12-20 06:20:08 +08:00
翻牌不@
This commit is contained in:
parent
85dc473821
commit
0d3dbbc8eb
@ -265,13 +265,14 @@ func init() { // 插件主体
|
|||||||
return
|
return
|
||||||
})
|
})
|
||||||
// 随机点名
|
// 随机点名
|
||||||
zero.OnFullMatchGroup([]string{"翻牌"}, zero.AdminPermission).SetBlock(true).SetPriority(24).
|
zero.OnFullMatchGroup([]string{"翻牌"}).SetBlock(true).SetPriority(40).
|
||||||
Handle(func(ctx *zero.Ctx) {
|
Handle(func(ctx *zero.Ctx) {
|
||||||
list := ctx.GetGroupMemberList(ctx.Event.GroupID)
|
if ctx.Event.GroupID > 0 {
|
||||||
path := fmt.Sprint(rand.Intn(int(list.Get("#").Int()))) + ".user_id"
|
list := ctx.GetGroupMemberList(ctx.Event.GroupID)
|
||||||
random_user_id := list.Get(path).Int()
|
path := fmt.Sprint(rand.Intn(int(list.Get("#").Int()))) + ".card"
|
||||||
ctx.SendChain(message.At(random_user_id), message.Text("就是你啦!"))
|
random_card := list.Get(path).String()
|
||||||
return
|
ctx.Send(random_card + ",就是你啦!")
|
||||||
|
}
|
||||||
})
|
})
|
||||||
// 入群欢迎
|
// 入群欢迎
|
||||||
zero.OnNotice().SetBlock(false).SetPriority(40).
|
zero.OnNotice().SetBlock(false).SetPriority(40).
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user