fix: 优化绑定功能的错误提示信息,增加了对用户输入的详细说明,同时在获取玩家数据时添加了重试机制以提高稳定性

This commit is contained in:
lixiangwuxian
2025-03-24 23:20:54 +08:00
parent f87922883e
commit afd80bb1bf
6 changed files with 41 additions and 43 deletions

View File

@@ -82,36 +82,6 @@ func unbindBL(msg model.Message) (reply model.Reply) {
}
}
// func getRecentScore(msg model.Message) (reply model.Reply) {
// count := 1
// if len(msg.RawMsg) > len("最热bl ") {
// var err error
// count, err = strconv.Atoi(msg.RawMsg[len("最热bl "):])
// if err != nil || count <= 0 {
// return model.Reply{
// ReplyMsg: "",
// ReferOriginMsg: true,
// FromMsg: msg,
// }
// }
// if count > 10 {
// count = 10
// }
// }
// scoreMsg := ""
// for _, v := range beatleader.BlScoresManager.GetRecentScores(count, " WHERE country = 'CN' ") {
// scoreMsg += v.ToString() + "\n\n"
// }
// if len(scoreMsg) > 0 {
// scoreMsg = scoreMsg[:len(scoreMsg)-len("\n\n")]
// }
// return model.Reply{
// ReplyMsg: scoreMsg,
// ReferOriginMsg: true,
// FromMsg: msg,
// }
// }
func getMyRecentScore(msg model.Message) (reply model.Reply) {
count := 1
scoreMsg := ""