refactor: inline getApiContext()

This commit is contained in:
Wesley F. Young
2024-08-11 19:10:42 +08:00
parent e88c0346f3
commit 89e777f99e
71 changed files with 173 additions and 167 deletions

View File

@@ -54,7 +54,7 @@ const _handlers: {
// then the qq is a group member
// Mlikiowa V2.0.0 Refactor Todo
const uid = await coreContext.getApiContext().UserApi.getUidByUin(atQQ);
const uid = await coreContext.apis.UserApi.getUidByUin(atQQ);
if (!uid) throw new Error('Get Uid Error');
return SendMsgElementConstructor.at(coreContext, atQQ, uid, AtType.atUser, '');
},
@@ -64,7 +64,7 @@ const _handlers: {
coreContext.context.logger.logWarn('回复消息不存在', id);
return undefined;
}
const NTQQMsgApi = coreContext.getApiContext().MsgApi;
const NTQQMsgApi = coreContext.apis.MsgApi;
const replyMsg = (await NTQQMsgApi.getMsgsByMsgId(
replyMsgM.Peer, [replyMsgM.MsgId!])).msgList[0];
return replyMsg ?