diff --git a/bilibili/live.go b/bilibili/live.go index 22828ea..29bfe55 100644 --- a/bilibili/live.go +++ b/bilibili/live.go @@ -10,6 +10,7 @@ import ( "live-gateway/live" "live-gateway/ws" "net/http" + "strings" "time" ) @@ -145,6 +146,10 @@ func (l *LiveBilibili) HandlerMessage(v interface{}) { logger.SLog.Error("读取消息CMD错误") return } + // 暂时忽略CMD错误 + if strings.Contains(cmd.CMD, "DANMU_MSG") { + cmd.CMD = "DANMU_MSG" + } handler, ok := l.msgHandlerMapper[cmd.CMD] if !ok { logger.SLog.Debugf("未发现 %s 处理器", cmd.CMD) diff --git a/config-dev.yml b/config-dev.yml index 835c712..fd09f1d 100644 --- a/config-dev.yml +++ b/config-dev.yml @@ -7,7 +7,7 @@ Bilibili: RoomId: 8722013 Log: Console: - Level: info + Level: debug Format: console File: Enabled: true