fix: 避免最后一条文本被丢弃

This commit is contained in:
lixiangwuxian 2025-05-05 03:42:33 +08:00
parent 380dc9fcf7
commit 9aa41d6d3f

View File

@ -282,9 +282,7 @@ func getMyRecentScore(msg model.Message) (reply *model.Reply) {
userName = record.Name
recordCount++
}
if len(scoreMsg) > 0 {
scoreMsg = scoreMsg[:len(scoreMsg)-len("\n")] //去掉最后一个换行符
} else {
if len(scoreMsg) <= 0 {
return &model.Reply{
ReplyMsg: "无最近游戏记录",
ReferOriginMsg: true,