From 2fccf247093121bc1a31ab08c18dfab2ef93b8e1 Mon Sep 17 00:00:00 2001 From: lixiangwuxian Date: Wed, 27 Nov 2024 01:15:45 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E6=9D=82=E9=A1=B9=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- handler/kw/kw.go | 7 ------- handler/newbond/service.go | 10 +++++----- handler/steamplaying/steam_playing.go | 2 +- 3 files changed, 6 insertions(+), 13 deletions(-) diff --git a/handler/kw/kw.go b/handler/kw/kw.go index 8a1750b..d1375e1 100644 --- a/handler/kw/kw.go +++ b/handler/kw/kw.go @@ -140,13 +140,6 @@ func kwReply(msg model.Message) (reply model.Reply) { wlist = append(wlist, v.Reply) } pick := rand.IntN(len(wlist)) - if util.Fail(0.1) { - return model.Reply{ - ReplyMsg: "", - ReferOriginMsg: false, - FromMsg: msg, - } - } return model.Reply{ ReplyMsg: wlist[pick], ReferOriginMsg: false, diff --git a/handler/newbond/service.go b/handler/newbond/service.go index a59aedf..713cd4d 100644 --- a/handler/newbond/service.go +++ b/handler/newbond/service.go @@ -225,11 +225,11 @@ func RoundCheckNewBond() { for !action.ActionManager.Started() { time.Sleep(5 * time.Second) } - once := true + // once := true for { - if !once { - time.Sleep(5 * time.Minute) - } + // if !once { + time.Sleep(5 * time.Minute) + // } bonds, err := GetBondsData() if bonds == nil || err != nil { fmt.Println("Error getting bonds data:", err) @@ -262,6 +262,6 @@ func RoundCheckNewBond() { } AddBondData(bond) } - once = false + // once = false } } diff --git a/handler/steamplaying/steam_playing.go b/handler/steamplaying/steam_playing.go index 821fda0..0fbdb52 100644 --- a/handler/steamplaying/steam_playing.go +++ b/handler/steamplaying/steam_playing.go @@ -184,7 +184,7 @@ func RoundCheckSteamPlaying() { } for _, group := range groups { - time.Sleep(3 * time.Second) + time.Sleep(15 * time.Second) if _, ok := playingMap[group]; !ok { playingMap[group] = map[string]string{} }