refactor: inline all NTQQXxxApi uses

This commit is contained in:
Wesley F. Young
2024-08-31 15:59:26 +08:00
parent 00e373a619
commit 3afd4f29ff
60 changed files with 130 additions and 281 deletions

View File

@@ -14,7 +14,6 @@ export class OneBotFriendApi {
//使用前预先判断 busiId 1061
async parsePrivatePokeEvent(grayTipElement: GrayTipElement) {
const NTQQUserApi = this.core.apis.UserApi;
const json = JSON.parse(grayTipElement.jsonGrayTipElement.jsonStr);
let pokedetail: any[] = json.items;
//筛选item带有uid的元素
@@ -23,8 +22,8 @@ export class OneBotFriendApi {
if (pokedetail.length == 2) {
return new OB11FriendPokeEvent(
this.core,
parseInt((await NTQQUserApi.getUinByUidV2(pokedetail[0].uid))!),
parseInt((await NTQQUserApi.getUinByUidV2(pokedetail[1].uid))!),
parseInt((await this.core.apis.UserApi.getUinByUidV2(pokedetail[0].uid))!),
parseInt((await this.core.apis.UserApi.getUinByUidV2(pokedetail[1].uid))!),
pokedetail,
);
}