Skip to content

Commit

Permalink
chore: update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
fumiama committed Nov 6, 2024
1 parent 67b3df2 commit 708bfd0
Show file tree
Hide file tree
Showing 11 changed files with 151 additions and 125 deletions.
4 changes: 2 additions & 2 deletions control/rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func init() {
// 个人用户
grp = -ctx.Event.UserID
}
var msg message.MessageSegment
var msg message.Segment
switch ctx.State["command"] {
case "响应", "response":
err := managers.Response(grp)
Expand All @@ -103,7 +103,7 @@ func init() {
zero.OnCommandGroup([]string{
"全局响应", "allresponse", "全局沉默", "allsilence",
}, zero.SuperUserPermission, zero.OnlyToMe).SetBlock(true).SecondPriority().Handle(func(ctx *zero.Ctx) {
var msg message.MessageSegment
var msg message.Segment
cmd := ctx.State["command"].(string)
switch {
case strings.Contains(cmd, "响应") || strings.Contains(cmd, "response"):
Expand Down
3 changes: 1 addition & 2 deletions control/web/model/webui.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,12 @@ type User struct {
const webuiFolder = "data/webui/"

var (
udb sql.Sqlite
udb = sql.New(webuiFolder + "user.db")
mu sync.RWMutex
)

func init() {
_ = os.MkdirAll(webuiFolder, 0755)
udb.DBPath = webuiFolder + "user.db"
err := udb.Open(time.Hour)
if err != nil {
panic(err)
Expand Down
4 changes: 2 additions & 2 deletions ctxext/message.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,15 @@ func SendToSelf(ctx *zero.Ctx) NoCtxSendMsg {
}

// FakeSenderForwardNode ...
func FakeSenderForwardNode(ctx *zero.Ctx, msgs ...message.MessageSegment) message.MessageSegment {
func FakeSenderForwardNode(ctx *zero.Ctx, msgs ...message.Segment) message.Segment {
return message.CustomNode(
ctx.CardOrNickName(ctx.Event.UserID),
ctx.Event.UserID,
msgs)
}

// SendFakeForwardToGroup ...
func SendFakeForwardToGroup(ctx *zero.Ctx, msgs ...message.MessageSegment) NoCtxSendMsg {
func SendFakeForwardToGroup(ctx *zero.Ctx, msgs ...message.Segment) NoCtxSendMsg {
return func(msg any) int64 {
return ctx.SendGroupForwardMessage(ctx.Event.GroupID, message.Message{
FakeSenderForwardNode(ctx, msg.(message.Message)...),
Expand Down
6 changes: 3 additions & 3 deletions driver/funcall.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func RegisterServer(r func(string, func(CQBot))) {

// Connect 连接服务端
func (f *FCClient) Connect() {
rsp, err := f.CallApi(zero.APIRequest{
rsp, err := f.CallAPI(zero.APIRequest{
Action: "get_login_info",
Params: nil,
})
Expand All @@ -96,10 +96,10 @@ func (f *FCClient) Listen(handler func([]byte, zero.APICaller)) {
f.handler = handler
}

// CallApi 发送请求
// CallAPI 发送请求
//
//nolint:stylecheck,revive

Check failure on line 101 in driver/funcall.go

View workflow job for this annotation

GitHub Actions / lint

directive `//nolint:stylecheck,revive` is unused for linter "stylecheck" (nolintlint)
func (f *FCClient) CallApi(req zero.APIRequest) (zero.APIResponse, error) {
func (f *FCClient) CallAPI(req zero.APIRequest) (zero.APIResponse, error) {
req.Echo = f.nextSeq()
rsp, err := f.handleRequest(&req)
log.Debug("向服务器发送请求: ", req)
Expand Down
50 changes: 26 additions & 24 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,41 +4,42 @@ go 1.20

require (
github.com/FloatTech/ZeroBot-Plugin-Webui v1.0.1-0.20230412164529-cfe878675931
github.com/FloatTech/floatbox v0.0.0-20240505082030-226ec6713e14
github.com/FloatTech/floatbox v0.0.0-20241106130736-5aea0a935024
github.com/FloatTech/imgfactory v0.2.2-0.20230315152233-49741fc994f9
github.com/FloatTech/rendercard v0.1.2
github.com/FloatTech/sqlite v1.6.3
github.com/FloatTech/zbpctrl v1.6.1
github.com/FloatTech/rendercard v0.2.0
github.com/FloatTech/sqlite v1.7.0
github.com/FloatTech/zbpctrl v1.7.0
github.com/RomiChan/syncx v0.0.0-20240418144900-b7402ffdebc7
github.com/RomiChan/websocket v1.4.3-0.20220227141055-9b2c6168c9c5
github.com/fumiama/cron v1.3.0
github.com/fumiama/go-base16384 v1.7.0
github.com/gin-gonic/gin v1.8.2
github.com/go-playground/assert/v2 v2.2.0
github.com/go-playground/validator/v10 v10.11.1
github.com/google/uuid v1.3.0
github.com/google/uuid v1.6.0
github.com/patrickmn/go-cache v2.1.0+incompatible
github.com/sirupsen/logrus v1.9.3
github.com/swaggo/files v1.0.0
github.com/swaggo/gin-swagger v1.5.3
github.com/swaggo/swag v1.8.10
github.com/tidwall/gjson v1.14.4
github.com/wdvxdr1123/ZeroBot v1.7.5-0.20240505070304-562ffeb33dcd
github.com/tidwall/gjson v1.18.0
github.com/wdvxdr1123/ZeroBot v1.8.0
)

require (
github.com/FloatTech/gg v1.1.3 // indirect
github.com/FloatTech/ttl v0.0.0-20230307105452-d6f7b2b647d1 // indirect
github.com/FloatTech/ttl v0.0.0-20240716161252-965925764562 // indirect
github.com/KyleBanks/depth v1.2.1 // indirect
github.com/PuerkitoBio/purell v1.1.1 // indirect
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
github.com/disintegration/imaging v1.6.2 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/ericpauley/go-quantize v0.0.0-20200331213906-ae555eb2afa4 // indirect
github.com/fumiama/go-registry v0.2.6 // indirect
github.com/fumiama/go-simple-protobuf v0.1.0 // indirect
github.com/fumiama/go-registry v0.2.7 // indirect
github.com/fumiama/go-simple-protobuf v0.2.0 // indirect
github.com/fumiama/gofastTEA v0.0.10 // indirect
github.com/fumiama/imgsz v0.0.2 // indirect
github.com/fumiama/terasu v0.0.0-20240502091919-c887e26289a8 // indirect
github.com/fumiama/terasu v0.0.0-20241027183601-987ab91031ce // indirect
github.com/gin-contrib/sse v0.1.0 // indirect
github.com/go-openapi/jsonpointer v0.19.5 // indirect
github.com/go-openapi/jsonreference v0.19.6 // indirect
Expand All @@ -52,29 +53,30 @@ require (
github.com/json-iterator/go v1.1.12 // indirect
github.com/leodido/go-urn v1.2.1 // indirect
github.com/mailru/easyjson v0.7.6 // indirect
github.com/mattn/go-isatty v0.0.16 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/ncruces/go-strftime v0.1.9 // indirect
github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 // indirect
github.com/pelletier/go-toml/v2 v2.0.6 // indirect
github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 // indirect
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
github.com/tidwall/match v1.1.1 // indirect
github.com/tidwall/pretty v1.2.0 // indirect
github.com/ugorji/go/codec v1.2.7 // indirect
golang.org/x/crypto v0.22.0 // indirect
golang.org/x/crypto v0.25.0 // indirect
golang.org/x/image v0.15.0 // indirect
golang.org/x/net v0.24.0 // indirect
golang.org/x/sys v0.19.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/tools v0.6.0 // indirect
golang.org/x/net v0.27.0 // indirect
golang.org/x/sys v0.26.0 // indirect
golang.org/x/text v0.19.0 // indirect
golang.org/x/tools v0.23.0 // indirect
google.golang.org/protobuf v1.28.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
modernc.org/libc v1.21.5 // indirect
modernc.org/mathutil v1.5.0 // indirect
modernc.org/memory v1.4.0 // indirect
modernc.org/sqlite v1.20.0 // indirect
modernc.org/libc v1.61.0 // indirect
modernc.org/mathutil v1.6.0 // indirect
modernc.org/memory v1.8.0 // indirect
modernc.org/sqlite v1.33.1 // indirect
)

replace modernc.org/sqlite => github.com/fumiama/sqlite3 v1.20.0-with-win386
replace modernc.org/sqlite => github.com/fumiama/sqlite3 v1.29.10-simp

replace github.com/remyoudompheng/bigfft => github.com/fumiama/bigfft v0.0.0-20211011143303-6e0bfa3c836b
replace modernc.org/libc => github.com/fumiama/libc v0.0.0-20240530081950-6f6d8586b5c5
Loading

0 comments on commit 708bfd0

Please sign in to comment.