diff --git a/src/common/utils/helper.ts b/src/common/utils/helper.ts index 1c46b261..e1029206 100644 --- a/src/common/utils/helper.ts +++ b/src/common/utils/helper.ts @@ -1,7 +1,5 @@ -import crypto from 'node:crypto'; import path from 'node:path'; import fs from 'fs'; -import * as fsPromise from 'node:fs/promises'; import os from 'node:os'; import { QQLevel } from '@/core'; diff --git a/src/common/utils/log.ts b/src/common/utils/log.ts index 5f53e739..bb5a37a1 100644 --- a/src/common/utils/log.ts +++ b/src/common/utils/log.ts @@ -2,7 +2,7 @@ import log4js, { Configuration } from 'log4js'; import { truncateString } from '@/common/utils/helper'; import path from 'node:path'; import chalk from 'chalk'; -import { AtType, ChatType, ElementType, ElementWrapper, RawMessage, SelfInfo } from '@/core'; +import { AtType, ChatType, ElementType, ElementWrapper, MessageElement, RawMessage, SelfInfo } from '@/core'; export enum LogLevel { DEBUG = 'debug', @@ -164,7 +164,7 @@ export function rawMessageToText(msg: RawMessage, recursiveLevel = 0): string { // message content - function msgElementToText(element: ElementWrapper) { + function msgElementToText(element: MessageElement) { if (element.textElement) { if (element.textElement.atType === AtType.notAt) { return element.textElement.content;