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

@@ -4,20 +4,26 @@ import (
"log"
"strconv"
"git.lxtend.com/qqbot/constants"
"git.lxtend.com/qqbot/handler"
"git.lxtend.com/qqbot/model"
"git.lxtend.com/qqbot/service/beatleader"
)
func init() {
handler.RegisterHandler("查bl", getMyBL)
handler.RegisterHandler("查bl", getMyBL, constants.LEVEL_USER)
handler.RegisterHelpInform("查bl", "查看您的最新分数")
handler.RegisterHandler("绑定bl", bindBL)
handler.RegisterHandler("绑bl", unbindBL)
handler.RegisterHandler("最新bl", getMyRecentScore)
handler.RegisterHandler("最热bl", getRecentScore)
handler.RegisterHandler("截图bl", screenShotBL)
handler.RegisterHandler("jbl", screenShotBL)
handler.RegisterHandler("绑定bl", bindBL, constants.LEVEL_USER)
handler.RegisterHelpInform("绑bl", "绑定您的beatleader账号")
handler.RegisterHandler("解绑bl", unbindBL, constants.LEVEL_USER)
handler.RegisterHelpInform("解绑bl", "解绑您的beatleader账号")
handler.RegisterHandler("最新bl", getMyRecentScore, constants.LEVEL_USER)
handler.RegisterHelpInform("最新bl", "查看您的最新游戏记录")
handler.RegisterHandler("最热bl", getRecentScore, constants.LEVEL_USER)
handler.RegisterHelpInform("最热bl", "查看全大陆的最新游戏记录")
handler.RegisterHandler("截bl", screenShotBL, constants.LEVEL_USER)
handler.RegisterHandler("jbl", screenShotBL, constants.LEVEL_USER)
handler.RegisterHelpInform("截bl/jbl", "beatleader主页截图")
}
func getMyBL(msg model.Message) (reply model.Reply) {