fix: type hint

This commit is contained in:
pk5ls20
2024-11-03 02:45:58 +08:00
parent d4327166c1
commit 018aca4db2
3 changed files with 4 additions and 4 deletions

View File

@@ -27,7 +27,7 @@ export class SendGroupAiRecord extends GetPacketStatusDepends<Payload, {
async _handle(payload: Payload) {
const rawRsp = await this.core.apis.PacketApi.sendAiVoiceChatReq(+payload.group_id, payload.character, payload.text, AIVoiceChatType.Sound);
const url = await this.core.apis.PacketApi.sendGroupPttFileDownloadReq(+payload.group_id, rawRsp.msgInfoBody![0].index as NapProtoEncodeStructType<typeof IndexNode>);
const url = await this.core.apis.PacketApi.sendGroupPttFileDownloadReq(+payload.group_id, rawRsp.msgInfoBody[0].index);
const { path, fileName, errMsg, success} = (await uri2local(this.core.NapCatTempPath, url));
if (!success) {
throw new Error(errMsg);