1
0
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:
源文雨
2026-01-03 21:44:26 +08:00
parent cb246240a3
commit 2def0c7108
5 changed files with 552 additions and 9 deletions

View File

@@ -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
}