feat: 添加beatleader相关查询

This commit is contained in:
lixiangwuxian
2024-10-20 01:26:14 +08:00
parent 674a5b2579
commit 33d98731d2
10 changed files with 1151 additions and 4 deletions

View File

@@ -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