MCPcopy Create free account
hub / github.com/LagrangeDev/LagrangeGo / GetCachedGroupInfo

Method GetCachedGroupInfo

client/cache.go:85–96  ·  view source on GitHub ↗

GetCachedGroupInfo 获取群信息(缓存)

(groupUin uint32)

Source from the content-addressed store, hash-verified

83
84// GetCachedGroupInfo 获取群信息(缓存)
85func (c *QQClient) GetCachedGroupInfo(groupUin uint32) *entity.Group {
86 if c.cache.GroupInfoCacheIsEmpty() {
87 if err := c.RefreshAllGroupsInfo(); err != nil {
88 return nil
89 }
90 }
91 if g := c.cache.GetGroupInfo(groupUin); g != nil {
92 return g
93 }
94 _ = c.RefreshAllGroupsInfo()
95 return c.cache.GetGroupInfo(groupUin)
96}
97
98// GetCachedAllGroupsInfo 获取所有群信息(缓存)
99func (c *QQClient) GetCachedAllGroupsInfo() map[uint32]*entity.Group {

Callers 3

SendGroupMessageMethod · 0.95
SendTempMessageMethod · 0.95
FetchEssenceMessageMethod · 0.95

Calls 3

RefreshAllGroupsInfoMethod · 0.95
GroupInfoCacheIsEmptyMethod · 0.80
GetGroupInfoMethod · 0.80

Tested by

no test coverage detected