fix: 更新 ssPlusN 函数中的错误提示信息,确保用户输入正整数以提高输入准确性

This commit is contained in:
lixiangwuxian 2025-03-31 02:43:10 +08:00
parent 057848ac30
commit 7cf39101f0

View File

@ -42,9 +42,9 @@ func ssPlusN(msg model.Message) (reply model.Reply) {
var N int var N int
if len(msg.RawMsg) > len("ss+") { if len(msg.RawMsg) > len("ss+") {
N, err = strconv.Atoi(msg.RawMsg[len("ss+"):]) N, err = strconv.Atoi(msg.RawMsg[len("ss+"):])
if err != nil { if err != nil || N <= 0 {
return model.Reply{ return model.Reply{
ReplyMsg: "请输入一个整数", ReplyMsg: "请输入一个整数",
ReferOriginMsg: true, ReferOriginMsg: true,
FromMsg: msg, FromMsg: msg,
} }