MCPcopy Create free account
hub / github.com/FloatTech/ZeroBot-Plugin-Playground / customrule

Function customrule

plugin/exJiangRed/message.go:183–188  ·  view source on GitHub ↗

自定义的规则, 只有群组和私聊中能触发

(ctx *zero.Ctx)

Source from the content-addressed store, hash-verified

181
182// 自定义的规则, 只有群组和私聊中能触发
183func customrule(ctx *zero.Ctx) bool {
184 if zero.OnlyGroup(ctx) || zero.OnlyPrivate(ctx) {
185 return true
186 }
187 return false
188}
189
190// 自定义的规则, 判断你处于什么权限
191func customrule2(ctx *zero.Ctx) bool {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected