style: 强类型大法

This commit is contained in:
手瓜一十雪
2025-02-02 23:22:21 +08:00
parent 76501bae34
commit 70945cf2d8
191 changed files with 923 additions and 806 deletions

View File

@@ -59,7 +59,7 @@ export class NTQQGroupApi {
}, pskey);
}
async getGroupShutUpMemberList(groupCode: string) {
async getGroupShutUpMemberList(groupCode: string): Promise<ShutUpGroupMember[]> {
const executor: TaskExecutor<ShutUpGroupMember[]> = async (resolve, reject, onCancel) => {
this.core.eventWrapper.registerListen(
'NodeIKernelGroupListener/onShutUpMemberListChanged',
@@ -215,6 +215,9 @@ export class NTQQGroupApi {
guildId: '',
peerUid: groupCode,
}, msgId, 1, false);
if (!MsgData.msgList[0]) {
throw new Error('消息不存在');
}
const param = {
groupCode: groupCode,
msgRandom: parseInt(MsgData.msgList[0].msgRandom),
@@ -255,6 +258,9 @@ export class NTQQGroupApi {
guildId: '',
peerUid: groupCode,
}, msgId, 1, false);
if (!MsgData.msgList[0]) {
throw new Error('消息不存在');
}
const param = {
groupCode: groupCode,
msgRandom: parseInt(MsgData.msgList[0].msgRandom),