chore: reformat code style

This commit is contained in:
Seijo Cecilia committed 2024-08-26 14:58:04 +08:00
1 parent fa1d266696
commit b16a429686
60 files changed
+295 -237

No files matched your search

@@ -26,14 +26,14 @@ class GetGroupMemberInfo extends BaseAction<Payload, OB11GroupMember> {
const NTQQGroupApi = this.core.apis.GroupApi;
const isNocache = typeof payload.no_cache === 'string' ? payload.no_cache === 'true' : !!payload.no_cache;
const uid = await NTQQUserApi.getUidByUinV2(payload.user_id.toString());
if (!uid) throw new Error (`Uin2Uid Error ${payload.user_id}不存在`);
if (!uid) throw new Error(`Uin2Uid Error ${payload.user_id}不存在`);
const [member, info] = await Promise.allSettled([
NTQQGroupApi.getGroupMemberV2(payload.group_id.toString(), uid, isNocache),
NTQQUserApi.getUserDetailInfo(uid),
]);
if (member.status !== 'fulfilled') throw new Error (`群(${payload.group_id})成员${payload.user_id}不存在 ${member.reason}`);
if (member.status !== 'fulfilled') throw new Error(`群(${payload.group_id})成员${payload.user_id}不存在 ${member.reason}`);
if (info.status === 'fulfilled') {
this.core.context.logger.logDebug("群成员详细信息结果", info.value);
this.core.context.logger.logDebug('群成员详细信息结果', info.value);
Object.assign(member, info.value);
} else {
this.core.context.logger.logDebug(`获取群成员详细信息失败, 只能返回基础信息 ${info.reason}`);