feat: 更新权限系统

This commit is contained in:
lixiangwuxian
2024-10-20 02:46:56 +08:00
parent 03ee846b7a
commit 049b5774bf
15 changed files with 77 additions and 51 deletions

View File

@@ -7,6 +7,7 @@ import (
"os/exec"
"time"
"git.lxtend.com/qqbot/constants"
"git.lxtend.com/qqbot/handler"
"git.lxtend.com/qqbot/model"
)
@@ -14,10 +15,10 @@ import (
var hasVaildBuild = true
func init() {
handler.RegisterHandler("/重启bot", restart)
handler.RegisterHandler("/构建bot", build)
handler.RegisterHandler("/构建重启", buildAndRestart)
handler.RegisterHandler("/gitpull", pullCode)
handler.RegisterHandler("/重启bot", restart, constants.LEVEL_ADMIN)
handler.RegisterHandler("/构建bot", build, constants.LEVEL_ADMIN)
handler.RegisterHandler("/构建重启", buildAndRestart, constants.LEVEL_ADMIN)
handler.RegisterHandler("/gitpull", pullCode, constants.LEVEL_ADMIN)
}
func restart(msg model.Message) model.Reply {