fix: 优化绑定SS功能,增加输入长度检查以提供更友好的提示信息
This commit is contained in:
parent
608576dd76
commit
b18e29b44b
@ -261,11 +261,18 @@ func getMySSPic(msg model.Message) (reply *model.Reply) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func bindSS(msg model.Message) (reply *model.Reply) {
|
func bindSS(msg model.Message) (reply *model.Reply) {
|
||||||
|
if len(msg.RawMsg) > len("绑定ss ") {
|
||||||
return &model.Reply{
|
return &model.Reply{
|
||||||
ReplyMsg: scoresaber.SSQuery.BindSS(strconv.Itoa(int(msg.UserId)), msg.RawMsg[len("绑定ss "):]),
|
ReplyMsg: scoresaber.SSQuery.BindSS(strconv.Itoa(int(msg.UserId)), msg.RawMsg[len("绑定ss "):]),
|
||||||
ReferOriginMsg: true,
|
ReferOriginMsg: true,
|
||||||
FromMsg: msg,
|
FromMsg: msg,
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
return &model.Reply{
|
||||||
|
ReplyMsg: "请输入您的scoresaber主页链接的末尾数字部分",
|
||||||
|
ReferOriginMsg: true,
|
||||||
|
FromMsg: msg,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func unbindSS(msg model.Message) (reply *model.Reply) {
|
func unbindSS(msg model.Message) (reply *model.Reply) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user