From 3b2d6a7a599307a78976fba26f363da3768e996c Mon Sep 17 00:00:00 2001 From: EvolvedGhost <727511070@qq.com> Date: Sat, 18 Jul 2026 01:03:25 +0800 Subject: [PATCH] fix(ts-protocol): drop self-echoed text messages TeamSpeak echoes a bot's own channel/server messages back to itself. Without filtering, a chunked reply re-entered the command path: !help's output exceeds the ~1024-byte per-message cap, so splitTextIntoChunks splits it, and the second chunk (which starts with "!artist ...") was parsed as a new !artist command, loading 20 search results and starting playback. Drop messages whose invokerID matches the bot's own clientId at the transport boundary, before they reach any consumer. --- src/ts-protocol/client.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ts-protocol/client.ts b/src/ts-protocol/client.ts index d9697c8..655b100 100644 --- a/src/ts-protocol/client.ts +++ b/src/ts-protocol/client.ts @@ -222,6 +222,7 @@ export class TS3Client extends EventEmitter { }); this.client.on("textMessage", (msg: TextMessage) => { + if (msg.invokerID === this.clientId) return; this.emit("textMessage", toTS3TextMessage(msg)); });