mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-03-02 00:30:25 +00:00
refactor: rename all coreContext -> core
This commit is contained in:
@@ -5,15 +5,15 @@ import { OB11FriendPokeEvent } from '../event/notice/OB11PokeEvent';
|
||||
|
||||
export class OneBotFriendApi {
|
||||
obContext: NapCatOneBot11Adapter;
|
||||
coreContext: NapCatCore;
|
||||
core: NapCatCore;
|
||||
friendList: Map<string, any> = new Map();//此处作为缓存 uin->info
|
||||
constructor(obContext: NapCatOneBot11Adapter, coreContext: NapCatCore) {
|
||||
constructor(obContext: NapCatOneBot11Adapter, core: NapCatCore) {
|
||||
this.obContext = obContext;
|
||||
this.coreContext = coreContext;
|
||||
this.core = core;
|
||||
}
|
||||
//使用前预先判断 busiId 1061
|
||||
async parsePrivatePokeEvent(grayTipElement: GrayTipElement) {
|
||||
const NTQQUserApi = this.coreContext.apis.UserApi;
|
||||
const NTQQUserApi = this.core.apis.UserApi;
|
||||
const json = JSON.parse(grayTipElement.jsonGrayTipElement.jsonStr);
|
||||
let pokedetail: any[] = json.items;
|
||||
//筛选item带有uid的元素
|
||||
@@ -21,7 +21,7 @@ export class OneBotFriendApi {
|
||||
//console.log("[NapCat] 群拍一拍 群:", pokedetail, parseInt(msg.peerUid), " ", await NTQQUserApi.getUinByUid(pokedetail[0].uid), "拍了拍", await NTQQUserApi.getUinByUid(pokedetail[1].uid));
|
||||
if (pokedetail.length == 2) {
|
||||
return new OB11FriendPokeEvent(
|
||||
this.coreContext,
|
||||
this.core,
|
||||
parseInt((await NTQQUserApi.getUinByUidV2(pokedetail[0].uid))!),
|
||||
parseInt((await NTQQUserApi.getUinByUidV2(pokedetail[1].uid))!),
|
||||
pokedetail
|
||||
|
||||
@@ -9,15 +9,15 @@ import { MessageUnique } from '@/common/utils/MessageUnique';
|
||||
|
||||
export class OneBotGroupApi {
|
||||
obContext: NapCatOneBot11Adapter;
|
||||
coreContext: NapCatCore;
|
||||
core: NapCatCore;
|
||||
GroupMemberList: Map<string, any> = new Map();//此处作为缓存 group_id->memberUin->info
|
||||
constructor(obContext: NapCatOneBot11Adapter, coreContext: NapCatCore) {
|
||||
constructor(obContext: NapCatOneBot11Adapter, core: NapCatCore) {
|
||||
this.obContext = obContext;
|
||||
this.coreContext = coreContext;
|
||||
this.core = core;
|
||||
}
|
||||
async parseGroupBanEvent(GroupCode: string, grayTipElement: GrayTipElement) {
|
||||
const groupElement = grayTipElement?.groupElement;
|
||||
const NTQQGroupApi = this.coreContext.apis.GroupApi;
|
||||
const NTQQGroupApi = this.core.apis.GroupApi;
|
||||
if (!groupElement?.shutUp) return undefined;
|
||||
const memberUid = groupElement.shutUp!.member.uid;
|
||||
const adminUid = groupElement.shutUp!.admin.uid;
|
||||
@@ -35,7 +35,7 @@ export class OneBotGroupApi {
|
||||
const adminUin = (await NTQQGroupApi.getGroupMember(GroupCode, adminUid))?.uin;
|
||||
if (memberUin && adminUin) {
|
||||
return new OB11GroupBanEvent(
|
||||
this.coreContext,
|
||||
this.core,
|
||||
parseInt(GroupCode),
|
||||
parseInt(memberUin),
|
||||
parseInt(adminUin),
|
||||
@@ -46,7 +46,7 @@ export class OneBotGroupApi {
|
||||
return undefined;
|
||||
}
|
||||
async parseGroupIncreaseEvent(GroupCode: string, grayTipElement: GrayTipElement) {
|
||||
this.coreContext.context.logger.logDebug('收到新人被邀请进群消息', grayTipElement);
|
||||
this.core.context.logger.logDebug('收到新人被邀请进群消息', grayTipElement);
|
||||
const xmlElement = grayTipElement.xmlElement;
|
||||
if (xmlElement?.content) {
|
||||
const regex = /jp="(\d+)"/g;
|
||||
@@ -61,7 +61,7 @@ export class OneBotGroupApi {
|
||||
if (matches.length === 2) {
|
||||
const [inviter, invitee] = matches;
|
||||
return new OB11GroupIncreaseEvent(
|
||||
this.coreContext,
|
||||
this.core,
|
||||
parseInt(GroupCode),
|
||||
parseInt(invitee),
|
||||
parseInt(inviter),
|
||||
@@ -72,7 +72,7 @@ export class OneBotGroupApi {
|
||||
return undefined;
|
||||
}
|
||||
async parseGroupMemberIncreaseEvent(GroupCode: string, grayTipElement: GrayTipElement) {
|
||||
const NTQQGroupApi = this.coreContext.apis.GroupApi;
|
||||
const NTQQGroupApi = this.core.apis.GroupApi;
|
||||
const groupElement = grayTipElement?.groupElement;
|
||||
if (!groupElement) return undefined;
|
||||
const member = await NTQQGroupApi.getGroupMemberV2(GroupCode, groupElement.memberUid);
|
||||
@@ -81,7 +81,7 @@ export class OneBotGroupApi {
|
||||
if (memberUin) {
|
||||
const operatorUin = adminMember?.uin || memberUin;
|
||||
return new OB11GroupIncreaseEvent(
|
||||
this.coreContext,
|
||||
this.core,
|
||||
parseInt(GroupCode),
|
||||
parseInt(memberUin),
|
||||
parseInt(operatorUin)
|
||||
@@ -90,16 +90,16 @@ export class OneBotGroupApi {
|
||||
return undefined;
|
||||
}
|
||||
async parseGroupKickEvent(GroupCode: string, grayTipElement: GrayTipElement) {
|
||||
const NTQQGroupApi = this.coreContext.apis.GroupApi;
|
||||
const NTQQUserApi = this.coreContext.apis.UserApi;
|
||||
const NTQQGroupApi = this.core.apis.GroupApi;
|
||||
const NTQQUserApi = this.core.apis.UserApi;
|
||||
const groupElement = grayTipElement?.groupElement;
|
||||
if (!groupElement) return undefined;
|
||||
const adminUin = (await NTQQGroupApi.getGroupMember(GroupCode, groupElement.adminUid))?.uin || (await NTQQUserApi.getUidByUinV2(groupElement.adminUid));
|
||||
if (adminUin) {
|
||||
return new OB11GroupDecreaseEvent(
|
||||
this.coreContext,
|
||||
this.core,
|
||||
parseInt(GroupCode),
|
||||
parseInt(this.coreContext.selfInfo.uin),
|
||||
parseInt(this.core.selfInfo.uin),
|
||||
parseInt(adminUin),
|
||||
'kick_me'
|
||||
);
|
||||
@@ -107,12 +107,12 @@ export class OneBotGroupApi {
|
||||
return undefined;
|
||||
}
|
||||
async parseGroupEmjioLikeEvent(GroupCode: string, grayTipElement: GrayTipElement) {
|
||||
const NTQQMsgApi = this.coreContext.apis.MsgApi;
|
||||
const NTQQMsgApi = this.core.apis.MsgApi;
|
||||
const emojiLikeData = new fastXmlParser.XMLParser({
|
||||
ignoreAttributes: false,
|
||||
attributeNamePrefix: '',
|
||||
}).parse(grayTipElement.xmlElement.content);
|
||||
this.coreContext.context.logger.logDebug('收到表情回应我的消息', emojiLikeData);
|
||||
this.core.context.logger.logDebug('收到表情回应我的消息', emojiLikeData);
|
||||
try {
|
||||
const senderUin = emojiLikeData.gtip.qq.jp;
|
||||
const msgSeq = emojiLikeData.gtip.url.msgseq;
|
||||
@@ -130,7 +130,7 @@ export class OneBotGroupApi {
|
||||
//console.log("表情回应消息长度检测", msgSeq, replyMsg.elements);
|
||||
if (!replyMsg) throw new Error('找不到回应消息');
|
||||
return new OB11GroupMsgEmojiLikeEvent(
|
||||
this.coreContext,
|
||||
this.core,
|
||||
parseInt(GroupCode),
|
||||
parseInt(senderUin),
|
||||
MessageUnique.getShortIdByMsgId(replyMsg.msgId)!,
|
||||
@@ -140,7 +140,7 @@ export class OneBotGroupApi {
|
||||
}],
|
||||
);
|
||||
} catch (e: any) {
|
||||
this.coreContext.context.logger.logError('解析表情回应消息失败', e.stack);
|
||||
this.core.context.logger.logError('解析表情回应消息失败', e.stack);
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ function keyCanBeParsed(key: string, parser: RawToOb11Converters): key is keyof
|
||||
|
||||
export class OneBotMsgApi {
|
||||
obContext: NapCatOneBot11Adapter;
|
||||
coreContext: NapCatCore;
|
||||
core: NapCatCore;
|
||||
|
||||
rawToOb11Converters: RawToOb11Converters = {
|
||||
textElement: async element => {
|
||||
@@ -78,7 +78,7 @@ export class OneBotMsgApi {
|
||||
const { atNtUid, /* content */ } = element;
|
||||
let atQQ = element.atUid;
|
||||
if (!atQQ || atQQ === '0') {
|
||||
atQQ = await this.coreContext.apis.UserApi.getUinByUidV2(atNtUid);
|
||||
atQQ = await this.core.apis.UserApi.getUinByUidV2(atNtUid);
|
||||
}
|
||||
if (atQQ) {
|
||||
qq = atQQ as `${number}`;
|
||||
@@ -102,18 +102,18 @@ export class OneBotMsgApi {
|
||||
file: element.fileName,
|
||||
sub_type: element.picSubType,
|
||||
file_id: UUIDConverter.encode(msg.peerUin, msg.msgId),
|
||||
url: await this.coreContext.apis.FileApi.getImageUrl(element),
|
||||
url: await this.core.apis.FileApi.getImageUrl(element),
|
||||
file_size: element.fileSize,
|
||||
},
|
||||
};
|
||||
} catch (e: any) {
|
||||
this.coreContext.context.logger.logError('获取图片url失败', e.stack);
|
||||
this.core.context.logger.logError('获取图片url失败', e.stack);
|
||||
return null;
|
||||
}
|
||||
},
|
||||
|
||||
fileElement: async (element, msg, elementWrapper) => {
|
||||
await this.coreContext.apis.FileApi.addFileCache(
|
||||
await this.core.apis.FileApi.addFileCache(
|
||||
{
|
||||
peerUid: msg.peerUid,
|
||||
chatType: msg.chatType,
|
||||
@@ -166,7 +166,7 @@ export class OneBotMsgApi {
|
||||
},
|
||||
|
||||
marketFaceElement: async (_, msg, elementWrapper) => {
|
||||
await this.coreContext.apis.FileApi.addFileCache(
|
||||
await this.core.apis.FileApi.addFileCache(
|
||||
{
|
||||
peerUid: msg.peerUid,
|
||||
chatType: msg.chatType,
|
||||
@@ -192,7 +192,7 @@ export class OneBotMsgApi {
|
||||
},
|
||||
|
||||
replyElement: async (element, msg) => {
|
||||
const NTQQMsgApi = this.coreContext.apis.MsgApi;
|
||||
const NTQQMsgApi = this.core.apis.MsgApi;
|
||||
const records = msg.records.find(msgRecord => msgRecord.msgId === element?.sourceMsgIdInRecords);
|
||||
const peer = {
|
||||
chatType: msg.chatType,
|
||||
@@ -200,7 +200,7 @@ export class OneBotMsgApi {
|
||||
guildId: '',
|
||||
};
|
||||
if (!records) {
|
||||
this.coreContext.context.logger.logError('获取不到引用的消息', element.replayMsgSeq);
|
||||
this.core.context.logger.logError('获取不到引用的消息', element.replayMsgSeq);
|
||||
return null;
|
||||
}
|
||||
let replyMsg: RawMessage | undefined;
|
||||
@@ -221,7 +221,7 @@ export class OneBotMsgApi {
|
||||
// Attempt 3
|
||||
const replyMsgList = (await NTQQMsgApi.getMsgExBySeq(peer, records.msgSeq)).msgList;
|
||||
if (replyMsgList.length < 1) {
|
||||
this.coreContext.context.logger.logError('回复消息消息验证失败', element.replayMsgSeq);
|
||||
this.core.context.logger.logError('回复消息消息验证失败', element.replayMsgSeq);
|
||||
return null;
|
||||
}
|
||||
replyMsg = replyMsgList.filter(e => e.msgSeq == records.msgSeq)
|
||||
@@ -242,7 +242,7 @@ export class OneBotMsgApi {
|
||||
},
|
||||
|
||||
videoElement: async (element, msg, elementWrapper) => {
|
||||
const NTQQFileApi = this.coreContext.apis.FileApi;
|
||||
const NTQQFileApi = this.core.apis.FileApi;
|
||||
|
||||
//读取视频链接并兜底
|
||||
let videoUrlWrappers: Awaited<ReturnType<typeof NTQQFileApi.getVideoUrl>> | undefined;
|
||||
@@ -257,7 +257,7 @@ export class OneBotMsgApi {
|
||||
guildId: '0',
|
||||
}, msg.msgId, elementWrapper.elementId);
|
||||
} catch (error) {
|
||||
this.coreContext.context.logger.logWarn('获取视频 URL 失败');
|
||||
this.core.context.logger.logWarn('获取视频 URL 失败');
|
||||
}
|
||||
|
||||
//读取在线URL
|
||||
@@ -305,7 +305,7 @@ export class OneBotMsgApi {
|
||||
},
|
||||
|
||||
pttElement: async (element, msg, elementWrapper) => {
|
||||
await this.coreContext.apis.FileApi.addFileCache(
|
||||
await this.core.apis.FileApi.addFileCache(
|
||||
{
|
||||
peerUid: msg.peerUid,
|
||||
chatType: msg.chatType,
|
||||
@@ -331,7 +331,7 @@ export class OneBotMsgApi {
|
||||
},
|
||||
|
||||
multiForwardMsgElement: async (_, msg) => {
|
||||
const NTQQMsgApi = this.coreContext.apis.MsgApi;
|
||||
const NTQQMsgApi = this.core.apis.MsgApi;
|
||||
const message_data: OB11MessageForward = {
|
||||
data: {} as any,
|
||||
type: OB11MessageDataType.forward,
|
||||
@@ -418,8 +418,8 @@ export class OneBotMsgApi {
|
||||
|
||||
if (!context.peer || context.peer.chatType == ChatType.KCHATTYPEC2C) return undefined;
|
||||
if (atQQ === 'all') return at(atQQ, atQQ, AtType.atAll, '全体成员');
|
||||
const NTQQGroupApi = this.coreContext.apis.GroupApi;
|
||||
const NTQQUserApi = this.coreContext.apis.UserApi;
|
||||
const NTQQGroupApi = this.core.apis.GroupApi;
|
||||
const NTQQUserApi = this.core.apis.UserApi;
|
||||
const atMember = await NTQQGroupApi.getGroupMember(context.peer.peerUid, atQQ);
|
||||
if (atMember) {
|
||||
return at(atQQ, atMember.uid, AtType.atUser, atMember.nick || atMember.cardName);
|
||||
@@ -433,10 +433,10 @@ export class OneBotMsgApi {
|
||||
[OB11MessageDataType.reply]: async ({ data: { id } }) => {
|
||||
const replyMsgM = MessageUnique.getMsgIdAndPeerByShortId(parseInt(id));
|
||||
if (!replyMsgM) {
|
||||
this.coreContext.context.logger.logWarn('回复消息不存在', id);
|
||||
this.core.context.logger.logWarn('回复消息不存在', id);
|
||||
return undefined;
|
||||
}
|
||||
const NTQQMsgApi = this.coreContext.apis.MsgApi;
|
||||
const NTQQMsgApi = this.core.apis.MsgApi;
|
||||
const replyMsg = (await NTQQMsgApi.getMsgsByMsgId(
|
||||
replyMsgM.Peer, [replyMsgM.MsgId])).msgList[0];
|
||||
return replyMsg ?
|
||||
@@ -497,7 +497,7 @@ export class OneBotMsgApi {
|
||||
|
||||
// File service
|
||||
[OB11MessageDataType.image]: async (sendMsg, context) => {
|
||||
const sendPicElement = await this.coreContext.apis.FileApi.createValidSendPicElement(
|
||||
const sendPicElement = await this.core.apis.FileApi.createValidSendPicElement(
|
||||
(await this.handleOb11FileLikeMessage(sendMsg, context)).path,
|
||||
sendMsg.data.summary,
|
||||
sendMsg.data.sub_type,
|
||||
@@ -508,7 +508,7 @@ export class OneBotMsgApi {
|
||||
|
||||
[OB11MessageDataType.file]: async (sendMsg, context) => {
|
||||
const { path, fileName } = await this.handleOb11FileLikeMessage(sendMsg, context);
|
||||
return await this.coreContext.apis.FileApi.createValidSendFileElement(path, fileName);
|
||||
return await this.core.apis.FileApi.createValidSendFileElement(path, fileName);
|
||||
},
|
||||
|
||||
[OB11MessageDataType.video]: async (sendMsg, context) => {
|
||||
@@ -516,17 +516,17 @@ export class OneBotMsgApi {
|
||||
|
||||
let thumb = sendMsg.data.thumb;
|
||||
if (thumb) {
|
||||
const uri2LocalRes = await uri2local(this.coreContext.NapCatTempPath, thumb);
|
||||
const uri2LocalRes = await uri2local(this.core.NapCatTempPath, thumb);
|
||||
if (uri2LocalRes.success) thumb = uri2LocalRes.path;
|
||||
}
|
||||
const videoEle = await this.coreContext.apis.FileApi.createValidSendVideoElement(path, fileName, thumb);
|
||||
const videoEle = await this.core.apis.FileApi.createValidSendVideoElement(path, fileName, thumb);
|
||||
|
||||
context.deleteAfterSentFiles.push(videoEle.videoElement.filePath);
|
||||
return videoEle;
|
||||
},
|
||||
|
||||
[OB11MessageDataType.voice]: async (sendMsg, context) =>
|
||||
this.coreContext.apis.FileApi.createValidSendPttElement(
|
||||
this.core.apis.FileApi.createValidSendPttElement(
|
||||
(await this.handleOb11FileLikeMessage(sendMsg, context)).path),
|
||||
|
||||
[OB11MessageDataType.json]: async ({ data: { data } }) => ({
|
||||
@@ -584,24 +584,24 @@ export class OneBotMsgApi {
|
||||
// 保留, 直到...找到更好的解决方案
|
||||
if (data.type === 'custom') {
|
||||
if (!data.url) {
|
||||
this.coreContext.context.logger.logError('自定义音卡缺少参数url');
|
||||
this.core.context.logger.logError('自定义音卡缺少参数url');
|
||||
return undefined;
|
||||
}
|
||||
if (!data.audio) {
|
||||
this.coreContext.context.logger.logError('自定义音卡缺少参数audio');
|
||||
this.core.context.logger.logError('自定义音卡缺少参数audio');
|
||||
return undefined;
|
||||
}
|
||||
if (!data.title) {
|
||||
this.coreContext.context.logger.logError('自定义音卡缺少参数title');
|
||||
this.core.context.logger.logError('自定义音卡缺少参数title');
|
||||
return undefined;
|
||||
}
|
||||
} else {
|
||||
if (!['qq', '163'].includes(data.type)) {
|
||||
this.coreContext.context.logger.logError('音乐卡片type错误, 只支持qq、163、custom,当前type:', data.type);
|
||||
this.core.context.logger.logError('音乐卡片type错误, 只支持qq、163、custom,当前type:', data.type);
|
||||
return undefined;
|
||||
}
|
||||
if (!data.id) {
|
||||
this.coreContext.context.logger.logError('音乐卡片缺少参数id');
|
||||
this.core.context.logger.logError('音乐卡片缺少参数id');
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
@@ -621,7 +621,7 @@ export class OneBotMsgApi {
|
||||
const musicJson = await RequestUtil.HttpGetJson<any>(signUrl, 'POST', postData);
|
||||
return this.ob11ToRawConverters.json(musicJson, context);
|
||||
} catch (e) {
|
||||
this.coreContext.context.logger.logError('生成音乐消息失败', e);
|
||||
this.core.context.logger.logError('生成音乐消息失败', e);
|
||||
}
|
||||
},
|
||||
|
||||
@@ -645,9 +645,9 @@ export class OneBotMsgApi {
|
||||
[OB11MessageDataType.miniapp]: async () => undefined,
|
||||
};
|
||||
|
||||
constructor(obContext: NapCatOneBot11Adapter, coreContext: NapCatCore) {
|
||||
constructor(obContext: NapCatOneBot11Adapter, core: NapCatCore) {
|
||||
this.obContext = obContext;
|
||||
this.coreContext = coreContext;
|
||||
this.core = core;
|
||||
}
|
||||
|
||||
async parseMessage(
|
||||
@@ -657,11 +657,11 @@ export class OneBotMsgApi {
|
||||
if (msg.senderUin == '0' || msg.senderUin == '') return;
|
||||
if (msg.peerUin == '0' || msg.peerUin == '') return;
|
||||
//跳过空消息
|
||||
const NTQQGroupApi = this.coreContext.apis.GroupApi;
|
||||
const NTQQUserApi = this.coreContext.apis.UserApi;
|
||||
const NTQQMsgApi = this.coreContext.apis.MsgApi;
|
||||
const NTQQGroupApi = this.core.apis.GroupApi;
|
||||
const NTQQUserApi = this.core.apis.UserApi;
|
||||
const NTQQMsgApi = this.core.apis.MsgApi;
|
||||
const resMsg: OB11Message = {
|
||||
self_id: parseInt(this.coreContext.selfInfo.uin),
|
||||
self_id: parseInt(this.core.selfInfo.uin),
|
||||
user_id: parseInt(msg.senderUin!),
|
||||
time: parseInt(msg.msgTime) || Date.now(),
|
||||
message_id: msg.id!,
|
||||
@@ -678,7 +678,7 @@ export class OneBotMsgApi {
|
||||
sub_type: 'friend',
|
||||
message: messagePostFormat === 'string' ? '' : [],
|
||||
message_format: messagePostFormat === 'string' ? 'string' : 'array',
|
||||
post_type: this.coreContext.selfInfo.uin == msg.senderUin ? EventType.MESSAGE_SENT : EventType.MESSAGE,
|
||||
post_type: this.core.selfInfo.uin == msg.senderUin ? EventType.MESSAGE_SENT : EventType.MESSAGE,
|
||||
};
|
||||
if (msg.chatType == ChatType.KCHATTYPEGROUP) {
|
||||
resMsg.sub_type = 'normal'; // 这里go-cqhttp是group,而onebot11标准是normal, 蛋疼
|
||||
@@ -763,7 +763,7 @@ export class OneBotMsgApi {
|
||||
const isBlankUrl = !inputdata.url || inputdata.url === '';
|
||||
const isBlankFile = !inputdata.file || inputdata.file === '';
|
||||
if (isBlankUrl && isBlankFile) {
|
||||
this.coreContext.context.logger.logError('文件消息缺少参数', inputdata);
|
||||
this.core.context.logger.logError('文件消息缺少参数', inputdata);
|
||||
throw Error('文件消息缺少参数');
|
||||
}
|
||||
const fileOrUrl = (isBlankUrl ? inputdata.file : inputdata.url) ?? "";
|
||||
@@ -773,10 +773,10 @@ export class OneBotMsgApi {
|
||||
fileName,
|
||||
errMsg,
|
||||
success,
|
||||
} = (await uri2local(this.coreContext.NapCatTempPath, fileOrUrl));
|
||||
} = (await uri2local(this.core.NapCatTempPath, fileOrUrl));
|
||||
|
||||
if (!success) {
|
||||
this.coreContext.context.logger.logError('文件下载失败', errMsg);
|
||||
this.core.context.logger.logError('文件下载失败', errMsg);
|
||||
throw Error('文件下载失败' + errMsg);
|
||||
}
|
||||
|
||||
|
||||
@@ -4,10 +4,10 @@ import { NapCatOneBot11Adapter } from '@/onebot';
|
||||
|
||||
export class OneBotUserApi {
|
||||
obContext: NapCatOneBot11Adapter;
|
||||
coreContext: NapCatCore;
|
||||
core: NapCatCore;
|
||||
|
||||
constructor(obContext: NapCatOneBot11Adapter, coreContext: NapCatCore) {
|
||||
constructor(obContext: NapCatOneBot11Adapter, core: NapCatCore) {
|
||||
this.obContext = obContext;
|
||||
this.coreContext = coreContext;
|
||||
this.core = core;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user