diff --git a/src/services/mpp/index.ts b/src/services/mpp/index.ts index 6323a18..e329c7e 100644 --- a/src/services/mpp/index.ts +++ b/src/services/mpp/index.ts @@ -73,16 +73,21 @@ export class MPPAgent extends ServiceAgent { ); if (str) { - if (str.includes("\n")) { - let sp = str.split("\n"); + this.logger.debug(str); + if (typeof str == "string") { + if (str.includes("\n")) { + let sp = str.split("\n"); - for (const s of sp) { - this.client.sendArray([ - { - m: "a", - message: `\u034f${s}` - } - ]); + for (const s of sp) { + this.client.sendArray([ + { + m: "a", + message: `\u034f${s}` + } + ]); + } + } else { + this.emit("send chat", str); } } else { this.emit("send chat", str);