Skip to content

Commit 60592d5

Browse files
committed
update log
1 parent 8dd8296 commit 60592d5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

service/plugins/log.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@ import (
44
"github.com/Mrs4s/MiraiGo/client"
55
"github.com/Mrs4s/MiraiGo/message"
66
"github.com/ProtobufBot/Go-Mirai-Client/pkg/plugin"
7-
"github.com/ProtobufBot/Go-Mirai-Client/pkg/util"
7+
"github.com/ProtobufBot/Go-Mirai-Client/service/bot"
88
log "github.com/sirupsen/logrus"
99
)
1010

1111
func LogPrivateMessage(cli *client.QQClient, event *message.PrivateMessage) int32 {
12-
log.Infof("Bot(%+v) Private(%+v) -> %+v\n", cli.Uin, event.Sender.Uin, util.MustMarshal(event))
12+
log.Infof("Bot(%+v) Private(%+v) -> %+v\n", cli.Uin, event.Sender.Uin, bot.MiraiMsgToRawMsg(cli, event.Elements))
1313
return plugin.MessageIgnore
1414
}
1515

1616
func LogGroupMessage(cli *client.QQClient, event *message.GroupMessage) int32 {
1717
cli.MarkGroupMessageReaded(event.GroupCode, int64(event.Id)) // 标记为已读,可能可以减少风控
18-
log.Infof("Bot(%+v) Group(%+v) -> %+v\n", cli.Uin, event.GroupCode, util.MustMarshal(event))
18+
log.Infof("Bot(%+v) Group(%+v) -> %+v\n", cli.Uin, event.GroupCode, bot.MiraiMsgToRawMsg(cli, event.Elements))
1919
return plugin.MessageIgnore
2020
}

0 commit comments

Comments
 (0)