fix: 优化绑定功能的错误提示信息,增加了对用户输入的详细说明,同时在获取玩家数据时添加了重试机制以提高稳定性
This commit is contained in:
@@ -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 := ""
|
||||
|
||||
@@ -51,7 +51,7 @@ func getSSProfile(msg model.Message) (reply model.Reply) {
|
||||
}
|
||||
if err != nil {
|
||||
return model.Reply{
|
||||
ReplyMsg: "您未绑定ss账号,输入\"绑定ss [ssId]\"绑定",
|
||||
ReplyMsg: "您未绑定ss账号,输入\"绑定ss [ssId]\"绑定(ssId为您的scoresaber主页链接中的数字部分)",
|
||||
ReferOriginMsg: true,
|
||||
FromMsg: msg,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user