mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2025-07-19 12:03:37 +00:00
fix: unuse import
This commit is contained in:
@@ -3,7 +3,7 @@ import { Sha1Stream } from "@/core/packet/utils/crypto/sha1Stream";
|
|||||||
|
|
||||||
export class CalculateStreamBytesTransform extends stream.Transform {
|
export class CalculateStreamBytesTransform extends stream.Transform {
|
||||||
private readonly blockSize = 1024 * 1024;
|
private readonly blockSize = 1024 * 1024;
|
||||||
private sha1: Sha1Stream;
|
private readonly sha1: Sha1Stream;
|
||||||
private buffer: Buffer;
|
private buffer: Buffer;
|
||||||
private bytesRead: number;
|
private bytesRead: number;
|
||||||
private readonly byteArrayList: Buffer[];
|
private readonly byteArrayList: Buffer[];
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
import BaseAction from '../BaseAction';
|
import BaseAction from '../BaseAction';
|
||||||
import { ActionName, BaseCheckResult } from '../types';
|
import { ActionName } from '../types';
|
||||||
|
|
||||||
interface Payload {
|
interface Payload {
|
||||||
start: number,
|
start: number,
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
import { FromSchema, JSONSchema } from 'json-schema-to-ts';
|
import { FromSchema, JSONSchema } from 'json-schema-to-ts';
|
||||||
import BaseAction from '../BaseAction';
|
import BaseAction from '../BaseAction';
|
||||||
import { ActionName, BaseCheckResult } from '../types';
|
import { ActionName } from '../types';
|
||||||
import { ChatType, Peer } from '@/core';
|
import { ChatType } from '@/core';
|
||||||
|
|
||||||
const SchemaData = {
|
const SchemaData = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
|
@@ -26,7 +26,7 @@ export class SendGroupAiRecord extends GetPacketStatusDepends<Payload, {
|
|||||||
async _handle(payload: Payload) {
|
async _handle(payload: Payload) {
|
||||||
const rawRsp = await this.core.apis.PacketApi.pkt.operation.GetAiVoice(+payload.group_id, payload.character, payload.text, AIVoiceChatType.Sound);
|
const rawRsp = await this.core.apis.PacketApi.pkt.operation.GetAiVoice(+payload.group_id, payload.character, payload.text, AIVoiceChatType.Sound);
|
||||||
const url = await this.core.apis.PacketApi.pkt.operation.GetGroupPttUrl(+payload.group_id, rawRsp.msgInfoBody[0].index);
|
const url = await this.core.apis.PacketApi.pkt.operation.GetGroupPttUrl(+payload.group_id, rawRsp.msgInfoBody[0].index);
|
||||||
const { path, fileName, errMsg, success } = (await uri2local(this.core.NapCatTempPath, url));
|
const { path, errMsg, success } = (await uri2local(this.core.NapCatTempPath, url));
|
||||||
if (!success) {
|
if (!success) {
|
||||||
throw new Error(errMsg);
|
throw new Error(errMsg);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user