feat: 添加beatleader相关查询
This commit is contained in:
@@ -11,11 +11,13 @@ import (
|
||||
|
||||
func init() {
|
||||
handler.RegisterHandler("查bl", getMyBL)
|
||||
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)
|
||||
}
|
||||
|
||||
func getMyBL(msg model.Message) (reply model.Reply) {
|
||||
@@ -82,6 +84,9 @@ func getRecentScore(msg model.Message) (reply model.Reply) {
|
||||
FromMsg: msg,
|
||||
}
|
||||
}
|
||||
if count > 10 {
|
||||
count = 10
|
||||
}
|
||||
}
|
||||
scoreMsg := ""
|
||||
for _, v := range beatleader.BlScoresManager.GetRecentScores(count, " WHERE country = 'CN' ") {
|
||||
@@ -110,6 +115,9 @@ func getMyRecentScore(msg model.Message) (reply model.Reply) {
|
||||
FromMsg: msg,
|
||||
}
|
||||
}
|
||||
if count > 10 {
|
||||
count = 10
|
||||
}
|
||||
}
|
||||
var userName string
|
||||
recordCount := 0
|
||||
|
||||
Reference in New Issue
Block a user