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

@@ -5,24 +5,25 @@ import (
"strconv"
"strings"
"git.lxtend.com/qqbot/constants"
"git.lxtend.com/qqbot/handler"
"git.lxtend.com/qqbot/model"
"git.lxtend.com/qqbot/service/scoresaber"
)
func init() {
handler.RegisterHandler("查ss", getSSProfile)
handler.RegisterHandler("查ss", getSSProfile, constants.LEVEL_USER)
handler.RegisterHelpInform("查ss", "查看您的最新分数")
handler.RegisterHandler("绑定ss", bindSS)
handler.RegisterHandler("绑定ss", bindSS, constants.LEVEL_USER)
handler.RegisterHelpInform("绑定ss", "绑定您的scoresaber账号")
handler.RegisterHandler("解绑ss", unbindSS)
handler.RegisterHandler("解绑ss", unbindSS, constants.LEVEL_USER)
handler.RegisterHelpInform("解绑ss", "解绑您的scoresaber账号")
handler.RegisterHandler("最新ss", getMyRecentScore)
handler.RegisterHandler("最新ss", getMyRecentScore, constants.LEVEL_USER)
handler.RegisterHelpInform("最新ss", "查看您的最新游戏记录")
handler.RegisterHandler("最热ss", getRecentScore)
handler.RegisterHandler("最热ss", getRecentScore, constants.LEVEL_USER)
handler.RegisterHelpInform("最热ss", "查看全大陆的最新游戏记录")
handler.RegisterHandler("截ss", screenshotSS)
handler.RegisterHandler("jss", screenshotSS)
handler.RegisterHandler("截ss", screenshotSS, constants.LEVEL_USER)
handler.RegisterHandler("jss", screenshotSS, constants.LEVEL_USER)
handler.RegisterHelpInform("截ss/jss", "scoresaber主页截图")
}