fix: 调整最近成绩消息的换行符处理

This commit is contained in:
lixiangwuxian 2025-03-08 18:10:47 +08:00
parent 8c7afd1715
commit 861ee37da3

View File

@ -168,12 +168,12 @@ func getMyRecentScore(msg model.Message) (reply model.Reply) {
File: util.GetResizedIamgePathByOrgPath(util.GenTempFilePath(record.SongHash + ".jpeg")),
},
}
scoreMsg += imageMsg.ToCQString() + record.ToString() + "\n\n"
scoreMsg += imageMsg.ToCQString() + record.ToString() + "\n"
userName = record.Name
recordCount++
}
if len(scoreMsg) > 0 {
scoreMsg = scoreMsg[:len(scoreMsg)-len("\n\n")] //去掉最后一个换行符
scoreMsg = scoreMsg[:len(scoreMsg)-len("\n")] //去掉最后一个换行符
} else {
return model.Reply{
ReplyMsg: "无最近游戏记录",