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