refactor: core

This commit is contained in:
linyuchen
2024-04-27 00:50:08 +08:00
parent 071a9f644b
commit 0782bd116f
21 changed files with 217 additions and 114 deletions

View File

@@ -4,7 +4,7 @@ import { getUidByUin, uid2UinMap } from '@/common/data';
import { OB11Constructor } from '../../constructor';
import { ActionName } from '../types';
import { NTQQUserApi } from '@/core/apis/user';
import { log } from '@/common/utils/log';
import { log, logDebug } from '@/common/utils/log';
export default class GoCQHTTPGetStrangerInfo extends BaseAction<{ user_id: number }, OB11User> {
@@ -12,7 +12,7 @@ export default class GoCQHTTPGetStrangerInfo extends BaseAction<{ user_id: numbe
protected async _handle(payload: { user_id: number }): Promise<OB11User> {
const user_id = payload.user_id.toString();
log('uidMaps', uid2UinMap);
logDebug('uidMaps', uid2UinMap);
const uid = getUidByUin(user_id);
if (!uid) {
throw new Error('查无此人');