(ctx *zero.Ctx)
| 110 | } |
| 111 | |
| 112 | func checkRule(ctx *zero.Ctx) bool { |
| 113 | if zero.OnlyPrivate(ctx) { |
| 114 | ctx.SendChain(message.Text("这是私聊信息")) |
| 115 | } |
| 116 | if zero.OnlyGroup(ctx) { |
| 117 | ctx.SendChain(message.Text("这是群聊信息")) |
| 118 | } |
| 119 | if zero.OnlyToMe(ctx) { |
| 120 | ctx.SendChain(message.Text("这是@bot的信息")) |
| 121 | } |
| 122 | if zero.OnlyGuild(ctx) { |
| 123 | ctx.SendChain(message.Text("这是频道信息")) |
| 124 | } |
| 125 | if zero.OnlyPublic(ctx) { |
| 126 | ctx.SendChain(message.Text("这是群聊或者频道信息")) |
| 127 | } |
| 128 | if zero.AdminPermission(ctx) { |
| 129 | ctx.SendChain(message.Text("你有管理员权限")) |
| 130 | } |
| 131 | if zero.OwnerPermission(ctx) { |
| 132 | ctx.SendChain(message.Text("你有群主权限")) |
| 133 | } |
| 134 | if zero.SuperUserPermission(ctx) { |
| 135 | ctx.SendChain(message.Text("你有主人权限")) |
| 136 | } |
| 137 | return true |
| 138 | } |
nothing calls this directly
no outgoing calls
no test coverage detected