fix: 性能优化

This commit is contained in:
手瓜一十雪
2024-12-04 18:29:33 +08:00
parent 388eb57d0d
commit eb99379a79

View File

@@ -21,7 +21,8 @@ export class GetGroupMemberList extends OneBotAction<Payload, OB11GroupMember[]>
const memberCache = this.core.apis.GroupApi.groupMemberCache;
let groupMembers = memberCache.get(groupIdStr);
if (noCache || !groupMembers) {
await this.core.apis.GroupApi.refreshGroupMemberCache(groupIdStr);
this.core.apis.GroupApi.refreshGroupMemberCache(groupIdStr).then().catch();
//下次刷新
groupMembers = memberCache.get(groupIdStr);
if (!groupMembers) {
throw new Error(`Failed to get group member list for group ${groupIdStr}`);