diff --git a/plugin/niuniu/main.go b/plugin/niuniu/main.go index a9810e8bd2..d843b303f3 100644 --- a/plugin/niuniu/main.go +++ b/plugin/niuniu/main.go @@ -289,10 +289,10 @@ func init() { dajiaoLimiter.Delete(fmt.Sprintf("%d_%d", gid, uid)) return } - messages, err := niuniu.processNiuNiuAction(t, fiancee[1]) if err != nil { ctx.SendChain(message.Text(err)) + dajiaoLimiter.Delete(fmt.Sprintf("%d_%d", gid, uid)) return } if err = db.insertNiuNiu(&niuniu, gid); err != nil { @@ -375,6 +375,7 @@ func init() { fencingResult, err := myniuniu.processJJuAction(&adduserniuniu, t, fiancee[1]) if err != nil { ctx.SendChain(message.Text(err)) + jjLimiter.Delete(t) return } diff --git a/plugin/niuniu/model.go b/plugin/niuniu/model.go index 99d959769e..eb65ba608d 100644 --- a/plugin/niuniu/model.go +++ b/plugin/niuniu/model.go @@ -142,8 +142,8 @@ func (u *userInfo) processNiuNiuAction(t string, props string) (string, error) { load, ok := prop.Load(t) info = *u if props != "" { - if !contains(t, dajiaoProp) { - return "", errors.New("道具不能混着用哦") + if contains(t, dajiaoProp) { + return "", errors.New("道具不存在") } if err = u.createUserInfoByProps(props); err != nil { return "", err @@ -221,8 +221,8 @@ func (u *userInfo) processJJuAction(adduserniuniu *userInfo, t string, props str v, ok := prop.Load(t) info = *u if props != "" { - if !contains(t, jjProp) { - return "", errors.New("道具不能混着用哦") + if contains(t, jjProp) { + return "", errors.New("道具不存在") } if err = u.createUserInfoByProps(props); err != nil { return "", err