1
0
mirror of https://github.com/fumiama/go-onebot-agent.git synced 2026-06-17 17:10:24 +08:00

feat: automatically load default perm table

This commit is contained in:
源文雨
2025-09-21 22:34:02 +08:00
parent 7f39bcf971
commit d55156efbd

View File

@@ -32,11 +32,13 @@ type Agent struct {
func NewAgent(
id int64, batchcap, itemscap int,
nickname, sex, characteristics, defaultprompt string,
) Agent {
return Agent{
) (ag Agent) {
ag = Agent{
id: id, nickname: nickname, sex: sex, chars: characteristics,
log: chat.NewLog[fmt.Stringer](batchcap, itemscap, "\n", defaultprompt),
}
ag.LoadPermTable()
return
}
// AddEvent 添加接收到的事件