fxxk-bot / bfv-bot

战地五QQ群机器人 | 支持战绩查询、屏蔽查询、加群自动改名片、黑名单进服提醒、卡排队提醒...
1 stars 0 forks source link

查询屏蔽功能, banlog 问题 #3

Open 15h6 opened 18 hours ago

15h6 commented 18 hours ago

不能正常查询屏蔽记录

查询功能, banlog 失败

log文件夹内的日志

cd6ae4a187bbf071ec5fe27acc4704ab 2024/10/10 - 15:00:39.102 INFO initialize/gin.go:32 路由注册完成 2024/10/10 - 15:00:39.120 INFO initialize/cron.go:43 定时任务初始化完成 2024/10/10 - 15:00:39.120 INFO initialize/sensitive.go:13 未加载到敏感词 2024/10/10 - 15:00:39.278 INFO bfv-bot/main.go:56 服务成功启动在 Port: 19997 2024/10/10 - 15:00:57.304 DEBUG initialize/gin.go:44 msg: {"self_id":3996023151,"user_id":1135432965,"time":1728543657,"message_id":1915861472,"message_seq":1915861472,"real_id":1915861472,"message_type":"group","sender":{"user_id":1135432965,"nickname":"星","card":"","role":"owner"},"raw_message":"banlog=hunzhuning","font":14,"sub_type":"normal","message":[{"type":"text","data":{"text":"banlog=hunzhuning"}}],"message_format":"array","post_type":"message","group_id":483143828}

2024/10/10 - 15:01:00.276 DEBUG utils/http.go:115 Get {"url": "https://api.bfvrobot.net/api/v2/bfv/checkPlayer", "stringResult": "{\"status\":1,\"message\":\"successful\",\"data\":{\"userId\":1012475737314,\"name\":\"HunZHuning\",\"personaId\":1006250937314}}"} 2024/10/10 - 15:01:00.937 DEBUG utils/http.go:115 Get {"url": "https://api.bfvrobot.net/api/v2/bfv/getBannedLogsByPid", "stringResult": "{\"success\":1,\"code\":\"getBannedLogsByPid.success\",\"data\":[{\"id\":318260,\"personaId\":\"1006250937314\",\"name\":\"HunZHuning\",\"serverName\":\"[BFV ROBOT][1028]S2 200DMGLV<200\",\"ownerId\":\"1006377491409\",\"gameId\":\"9563303870511\",\"type\":\"3\",\"byUser\":\"\",\"reason\":\"卡排队 随机\",\"createTime\":\"2024-10-08T02:46:20.000Z\"},{\"id\":318259,\"personaId\":\"1006250937314\",\"name\":\"HunZHuning\",\"serverName\":\"[BFV ROBOT][1028]S2 200DMGLV<200\",\"ownerId\":\"1006377491409\",\"gameId\":\"9563303870511\",\"type\":\"3\",\"byUser\":\"\",\"reason\":\"卡排队 随机\",\"createTime\":\"2024-10-08T02:46:01.000Z\"},{\"id\":286358,\"personaId\":\"1006250937314\",\"name\":\"HunZHuning\",\"serverName\":\"[MiNi ROBOT][FS]低压萌新服硫磺岛循环Lv<150\",\"ownerId\":\"1006324181416\",\"gameId\":\"9507408560811\",\"type\":\"3\",\"byUser\":null,\"reason\":\"近期kpm: 1.53 (2024-09-25 11:07:10, 生涯第 126.2 小时) 超出kpm限制: 1.5\",\"createTime\":\"2024-09-25T03:07:19.000Z\"},{\"id\":286350,\"personaId\":\"1006250937314\",\"name\":\"HunZHuning\",\"serverName\":\"MINI ROBOT WuFeiJu LV<100 7K7KS1\",\"ownerId\":\"1008835564457\",\"gameId\":\"9507130520257\",\"type\":\"3\",\"byUser\":null,\"reason\":\"近期kpm: 1.53 (2024-09-25 11:04:39, 生涯第 126.2 小时) 超出kpm限制: 1.5\",\"createTime\":\"2024-09-25T03:04:45.000Z\"}]}"} 2024/10/10 - 15:01:00.938 ERROR initialize/gin.go:123 [Recovery from panic] {"error": "time: missing Location in call to Time.In", "request": "POST /api/event/post HTTP/1.1 Host: 127.0.0.1:19997 Accept: / Accept-Encoding: gzip, deflate Accept-Language: Connection: keep-alive Content-Length: 424 Content-Type: application/json Sec-Fetch-Mode: cors User-Agent: node X-Self-Id: 3996023151 "} 2024/10/10 - 15:01:00.942 ERROR initialize/gin.go:133 goroutine 27 [running]: runtime/debug.Stack() /usr/local/go/src/runtime/debug/stack.go:24 +0x5e bfv-bot/common/initialize.Routers.GinRecovery.func2.1() /root/bfv-bot/common/initialize/gin.go:132 +0x3c9 panic({0xcc9700?, 0xf5d210?}) /usr/local/go/src/runtime/panic.go:770 +0x132 time.Time.In(...) /usr/local/go/src/time/time.go:1167 bfv-bot/common/utils.Format({0xc000229420?, 0xc000067008?, 0x0?}) /root/bfv-bot/common/utils/datetime.go:29 +0xde bfv-bot/common/utils.GetBanLog({0xc00037ee2f?, 0xc0002de040?}) /root/bfv-bot/common/utils/third.go:142 +0x3d0 bfv-bot/api.banlog(0xd02de0?, 0xc000486000, {0xc00037ee28?, 0x11?}) /root/bfv-bot/api/event.go:572 +0x65 bfv-bot/api.(EventApi).Post(0xe06bdc?, 0xc000486000) /root/bfv-bot/api/event.go:109 +0x9a9 github.com/gin-gonic/gin.(Context).Next(0xc000486000) /root/go/pkg/mod/github.com/gin-gonic/gin@v1.7.0/context.go:165 +0x2b bfv-bot/common/initialize.Routers.Options.func3(0xc000486000) /root/bfv-bot/common/utils/gin.go:17 +0xb3 github.com/gin-gonic/gin.(Context).Next(0xc000486000) /root/go/pkg/mod/github.com/gin-gonic/gin@v1.7.0/context.go:165 +0x2b bfv-bot/common/initialize.Routers.GinRecovery.func2(0xc0002d3840?) /root/bfv-bot/common/initialize/gin.go:139 +0x52 github.com/gin-gonic/gin.(Context).Next(0xc000486000) /root/go/pkg/mod/github.com/gin-gonic/gin@v1.7.0/context.go:165 +0x2b bfv-bot/common/initialize.Routers.GinLogger.func1(0xc000486000) /root/bfv-bot/common/initialize/gin.go:52 +0x225 github.com/gin-gonic/gin.(Context).Next(...) /root/go/pkg/mod/github.com/gin-gonic/gin@v1.7.0/context.go:165 github.com/gin-gonic/gin.(Engine).handleHTTPRequest(0xc000294340, 0xc000486000) /root/go/pkg/mod/github.com/gin-gonic/gin@v1.7.0/gin.go:489 +0x650 github.com/gin-gonic/gin.(Engine).ServeHTTP(0xc000294340, {0xf65da0, 0xc00009a0e0}, 0xc0000d0120) /root/go/pkg/mod/github.com/gin-gonic/gin@v1.7.0/gin.go:445 +0x198 net/http.serverHandler.ServeHTTP({0xf63b28?}, {0xf65da0?, 0xc00009a0e0?}, 0x6?) /usr/local/go/src/net/http/server.go:3137 +0x8e net/http.(conn).serve(0xc0002a21b0, {0xf67148, 0xc00003d920}) /usr/local/go/src/net/http/server.go:2039 +0x5e8 created by net/http.(Server).Serve in goroutine 1 /usr/local/go/src/net/http/server.go:3285 +0x4b4

2024/10/10 - 15:01:00.943 INFO initialize/gin.go:60 [GIN] | 500 | 3637ms | 127.0.0.1 | POST  "/api/event/post"

fxxk-bot commented 12 hours ago

https://github.com/fxxk-bot/bfv-bot/releases/tag/1.0.1

下载最新程序试试, 手头没有相关环境无法复现