From 773ce9bcb6ba6a9cd59d0ff51053b2e31d610912 Mon Sep 17 00:00:00 2001 From: Hoshina Date: Sat, 14 Feb 2026 19:58:19 +0800 Subject: [PATCH] fix: update BotStatus type in oneBotRawEvent and adjust status checks --- pkg/channels/onebot.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pkg/channels/onebot.go b/pkg/channels/onebot.go index ae563b8..dadc9bc 100644 --- a/pkg/channels/onebot.go +++ b/pkg/channels/onebot.go @@ -45,7 +45,12 @@ type oneBotRawEvent struct { MetaEventType string `json:"meta_event_type"` Echo string `json:"echo"` RetCode json.RawMessage `json:"retcode"` - Status string `json:"status"` + Status BotStatus `json:"status"` +} + +type BotStatus struct { + Online bool `json:"online"` + Good bool `json:"good"` } type oneBotSender struct { @@ -322,7 +327,7 @@ func (c *OneBotChannel) listen() { continue } - if raw.Echo != "" || raw.Status != "" { + if raw.Echo != "" || raw.Status.Online || raw.Status.Good { logger.DebugCF("onebot", "Received API response, skipping", map[string]interface{}{ "echo": raw.Echo, "status": raw.Status,