fix: type

This commit is contained in:
手瓜一十雪 committed 2024-08-22 15:42:07 +08:00
1 parent f31b0d0c71
commit 2dd0907565
2 files changed
+2 -4

No files matched your search

+2 -2
View File
@@ -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;