diff --git a/core/node_strings.go b/core/node_strings.go index 1e412d0..0955810 100644 --- a/core/node_strings.go +++ b/core/node_strings.go @@ -218,6 +218,7 @@ func (sender *Strings) HideCQEmoji(text string) map[string]interface{} { } } +// 构建CQ码 func (sender *Strings) BuildCQCode(cqType string, params map[string]interface{}) string { var sb strings.Builder sb.WriteString("[CQ:" + cqType) diff --git a/core/node_temp.go b/core/node_temp.go index 4996a70..0247749 100644 --- a/core/node_temp.go +++ b/core/node_temp.go @@ -40,6 +40,8 @@ func (s *PersistentKeyValueStore) Set(key string, value interface{}, dur int) er ExpiredAt: expiredAt, } go func() { + s.RLock() + defer s.RUnlock() defer func() { recover() }()