mirror of
https://github.com/fumiama/go-onebot-agent.git
synced 2026-06-27 07:30:25 +08:00
feat: add more info in sysp
This commit is contained in:
@@ -3,6 +3,7 @@ package goba
|
||||
import (
|
||||
_ "embed"
|
||||
"fmt"
|
||||
"time"
|
||||
)
|
||||
|
||||
//go:embed README.md
|
||||
@@ -13,8 +14,14 @@ func (ag *Agent) system(role PermRole, grp int64) (string, error) {
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
t := time.Now()
|
||||
typ := "群聊"
|
||||
if grp < 0 {
|
||||
typ = "私聊"
|
||||
}
|
||||
return fmt.Sprintf(
|
||||
sysp, ag.id, ag.nickname, ag.sex,
|
||||
ag.chars, tab, ag.memoryof(grp),
|
||||
t.Format(time.RFC3339), t.Unix(), typ,
|
||||
), nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user