fix: 调整最近成绩消息的换行符处理
This commit is contained in:
parent
8c7afd1715
commit
861ee37da3
@ -168,12 +168,12 @@ func getMyRecentScore(msg model.Message) (reply model.Reply) {
|
|||||||
File: util.GetResizedIamgePathByOrgPath(util.GenTempFilePath(record.SongHash + ".jpeg")),
|
File: util.GetResizedIamgePathByOrgPath(util.GenTempFilePath(record.SongHash + ".jpeg")),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
scoreMsg += imageMsg.ToCQString() + record.ToString() + "\n\n"
|
scoreMsg += imageMsg.ToCQString() + record.ToString() + "\n"
|
||||||
userName = record.Name
|
userName = record.Name
|
||||||
recordCount++
|
recordCount++
|
||||||
}
|
}
|
||||||
if len(scoreMsg) > 0 {
|
if len(scoreMsg) > 0 {
|
||||||
scoreMsg = scoreMsg[:len(scoreMsg)-len("\n\n")] //去掉最后一个换行符
|
scoreMsg = scoreMsg[:len(scoreMsg)-len("\n")] //去掉最后一个换行符
|
||||||
} else {
|
} else {
|
||||||
return model.Reply{
|
return model.Reply{
|
||||||
ReplyMsg: "无最近游戏记录",
|
ReplyMsg: "无最近游戏记录",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user