Skip to content

Commit 9e12cea

Browse files
committed
send msg log
1 parent 1eade74 commit 9e12cea

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

service/bot/api_handler.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ func HandleSendPrivateMsg(cli *client.QQClient, req *onebot.SendPrivateMsgReq) *
5656
miraiMsg := ProtoMsgToMiraiMsg(req.Message, req.AutoEscape)
5757
sendingMessage := &message.SendingMessage{Elements: miraiMsg}
5858
preProcessPrivateSendingMessage(cli, req.UserId, sendingMessage)
59+
log.Infof("Bot(%d) Private(%d) <- %s", cli.Uin, req.UserId, MiraiMsgToRawMsg(miraiMsg))
5960
ret := cli.SendPrivateMessage(req.UserId, sendingMessage)
6061
cache.PrivateMessageLru.Add(ret.Id, ret)
6162
return &onebot.SendPrivateMsgResp{
@@ -67,6 +68,7 @@ func HandleSendGroupMsg(cli *client.QQClient, req *onebot.SendGroupMsgReq) *oneb
6768
miraiMsg := ProtoMsgToMiraiMsg(req.Message, req.AutoEscape)
6869
sendingMessage := &message.SendingMessage{Elements: miraiMsg}
6970
preProcessGroupSendingMessage(cli, req.GroupId, sendingMessage)
71+
log.Infof("Bot(%d) Group(%d) <- %s", cli.Uin, req.GroupId, MiraiMsgToRawMsg(miraiMsg))
7072
ret := cli.SendGroupMessage(req.GroupId, sendingMessage)
7173
cache.GroupMessageLru.Add(ret.Id, ret)
7274
return &onebot.SendGroupMsgResp{

0 commit comments

Comments
 (0)