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:
6
agent.go
6
agent.go
@@ -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 添加接收到的事件
|
||||
|
||||
Reference in New Issue
Block a user