mirror of
https://github.com/fumiama/NanoBot.git
synced 2026-06-20 02:40:25 +08:00
reduce permission
This commit is contained in:
16
rule.go
16
rule.go
@@ -47,14 +47,11 @@ func init() {
|
|||||||
msg = ctx.Caller.ready.User.Username + "已经在工作了哦~"
|
msg = ctx.Caller.ready.User.Username + "已经在工作了哦~"
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
if SuperUserPermission(ctx) {
|
err := m.Response(int64(grp))
|
||||||
err := m.Response(int64(grp))
|
if err == nil {
|
||||||
if err == nil {
|
msg = ctx.Caller.ready.User.Username + "将开始在此工作啦~"
|
||||||
msg = ctx.Caller.ready.User.Username + "将开始在此工作啦~"
|
} else {
|
||||||
} else {
|
msg = "ERROR: " + err.Error()
|
||||||
msg = "ERROR: " + err.Error()
|
|
||||||
}
|
|
||||||
break
|
|
||||||
}
|
}
|
||||||
case "沉默", "silence":
|
case "沉默", "silence":
|
||||||
if !m.CanResponse(int64(grp)) {
|
if !m.CanResponse(int64(grp)) {
|
||||||
@@ -67,9 +64,6 @@ func init() {
|
|||||||
} else {
|
} else {
|
||||||
msg = "ERROR: " + err.Error()
|
msg = "ERROR: " + err.Error()
|
||||||
}
|
}
|
||||||
if SuperUserPermission(ctx) {
|
|
||||||
break
|
|
||||||
}
|
|
||||||
default:
|
default:
|
||||||
msg = "ERROR: bad command\"" + fmt.Sprint(ctx.State["command"]) + "\""
|
msg = "ERROR: bad command\"" + fmt.Sprint(ctx.State["command"]) + "\""
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user