Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix:一些小问题 #1043

Merged
merged 1 commit into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion plugin/niuniu/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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
}

Expand Down
8 changes: 4 additions & 4 deletions plugin/niuniu/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Loading