Skip to content

Commit

Permalink
problem is tx
Browse files Browse the repository at this point in the history
  • Loading branch information
Jiang-Red committed Jun 29, 2022
1 parent 1db2620 commit c685cc3
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion plugin/managerplugin/managerplugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ func init() {
}
ctx.SendChain(message.Text(blacklist...))
})
engine.OnRegex(`踢出等级为([0-9]{1,3})的人`, zero.OnlyGroup, zero.AdminPermission).SetBlock(true).
/*engine.OnRegex(`踢出等级为([0-9]{1,3})的人`, zero.OnlyGroup, zero.AdminPermission).SetBlock(true).
Handle(func(ctx *zero.Ctx) {
setlevel := math.Str2Int64(ctx.State["regex_matched"].([]string)[1])
if setlevel > 100 {
Expand Down Expand Up @@ -141,6 +141,7 @@ func init() {
banid := ban.Get("user_id").Int()
banlevel := ban.Get("level").String()
levelint := math.Str2Int64(banlevel)
for _, adminid := range zero.BotConfig.SuperUsers {
if levelint == setlevel && banid != ctx.Event.SelfID && banid != adminid {
ctx.SetGroupKick(gid, banid, true)
Expand All @@ -150,6 +151,20 @@ func init() {
}
ctx.SendChain(message.Text("本次一共踢出了", i, "个人"))
})
engine.OnFullMatch("获取群成员信息", zero.OnlyGroup, zero.AdminPermission).SetBlock(true).
Handle(func(ctx *zero.Ctx) {
gid := ctx.Event.GroupID
temp := ctx.GetGroupMemberListNoCache(gid).Array()
l := make(message.Message, 1, 2000)
l[0] = ctxext.FakeSenderForwardNode(ctx, message.Text("--群成员信息--"))
for _, v := range temp {
id := v.Get("user_id").Int()
te := ctx.GetGroupMemberInfo(gid, id, true)
level := te.Get("level").String()
l = append(l, ctxext.FakeSenderForwardNode(ctx, message.Text("qq号:", id, "\n", "群等级:", level)))
}
ctx.SendGroupForwardMessage(gid, l)
})*/
engine.OnRegex(`^\[CQ:xml`, zero.OnlyGroup, zero.KeywordRule("serviceID=\"60\"")).SetBlock(true).
Handle(func(ctx *zero.Ctx) {
nickname := ctx.CardOrNickName(ctx.Event.UserID)
Expand Down

0 comments on commit c685cc3

Please sign in to comment.