1
0
mirror of https://github.com/fumiama/go-onebot-agent.git synced 2026-06-05 02:00:23 +08:00

doc: add more docs

This commit is contained in:
源文雨
2025-09-21 14:52:52 +08:00
parent 6f4ee04e55
commit fd19fda4fd
4 changed files with 19 additions and 5 deletions

View File

@@ -1,3 +1,4 @@
// Package goba OneBot 11 协议 QQ 聊天 Agent
package goba
import (
@@ -37,10 +38,12 @@ func NewAgent(
}
}
// AddEvent 添加接收到的事件
func (ag *Agent) AddEvent(grp int64, ev *Event) {
ag.log.Add(grp, ev, false)
}
// AddRequest 一般无需主动调用, 由 GetAction 自动添加
func (ag *Agent) AddRequest(grp int64, req *zero.APIRequest) {
ag.log.Add(grp, req, true)
}