fix: 避免最后一条文本被丢弃
This commit is contained in:
parent
380dc9fcf7
commit
9aa41d6d3f
@ -282,9 +282,7 @@ func getMyRecentScore(msg model.Message) (reply *model.Reply) {
|
|||||||
userName = record.Name
|
userName = record.Name
|
||||||
recordCount++
|
recordCount++
|
||||||
}
|
}
|
||||||
if len(scoreMsg) > 0 {
|
if len(scoreMsg) <= 0 {
|
||||||
scoreMsg = scoreMsg[:len(scoreMsg)-len("\n")] //去掉最后一个换行符
|
|
||||||
} else {
|
|
||||||
return &model.Reply{
|
return &model.Reply{
|
||||||
ReplyMsg: "无最近游戏记录",
|
ReplyMsg: "无最近游戏记录",
|
||||||
ReferOriginMsg: true,
|
ReferOriginMsg: true,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user