From 62b5b0985701cb1d841ee98a1d00de9095da536e Mon Sep 17 00:00:00 2001 From: Dr1mH4X <102709153+Dr1mH4X@users.noreply.github.com> Date: Tue, 23 Jun 2026 02:45:09 +0800 Subject: [PATCH] chore: add success log for numeric channel join --- src/bot/manager.ts | 32 ++++++++++++++++---------------- src/ts-protocol/client.ts | 1 + web/src/views/Setup.vue | 2 +- 3 files changed, 18 insertions(+), 17 deletions(-) diff --git a/src/bot/manager.ts b/src/bot/manager.ts index ebaf706..f9535d6 100644 --- a/src/bot/manager.ts +++ b/src/bot/manager.ts @@ -225,22 +225,22 @@ export class BotManager extends EventEmitter { const bot = new BotInstance({ id: saved.id, name: saved.name, - tsOptions: { - host: saved.serverAddress, - port: saved.serverPort, - queryPort: proto === "ts6" ? 10080 : 10011, - nickname: saved.nickname, - // Reuse the stored identity so server groups assigned to this bot - // survive restarts — without this the TS server sees a new UID - // each connect and strips all previously granted groups. - identity: saved.identity || undefined, - defaultChannel: saved.defaultChannel || undefined, - channelId: saved.channelId || undefined, - channelPassword: saved.channelPassword || undefined, - serverPassword: saved.serverPassword || undefined, - serverProtocol: proto === "ts3" || proto === "ts6" ? proto : undefined, - ts6ApiKey: saved.ts6ApiKey || undefined, - }, + tsOptions: { + host: saved.serverAddress, + port: saved.serverPort, + queryPort: proto === "ts6" ? 10080 : 10011, + nickname: saved.nickname, + // Reuse the stored identity so server groups assigned to this bot + // survive restarts — without this the TS server sees a new UID + // each connect and strips all previously granted groups. + identity: saved.identity || undefined, + defaultChannel: saved.defaultChannel || undefined, + channelId: saved.channelId || undefined, + channelPassword: saved.channelPassword || undefined, + serverPassword: saved.serverPassword || undefined, + serverProtocol: proto === "ts3" || proto === "ts6" ? proto : undefined, + ts6ApiKey: saved.ts6ApiKey || undefined, + }, neteaseProvider: this.neteaseProvider, qqProvider: this.qqProvider, bilibiliProvider: this.bilibiliProvider, diff --git a/src/ts-protocol/client.ts b/src/ts-protocol/client.ts index 4284f76..f743421 100644 --- a/src/ts-protocol/client.ts +++ b/src/ts-protocol/client.ts @@ -275,6 +275,7 @@ export class TS3Client extends EventEmitter { if (isNumeric) { try { await clientMove(this.client, this.clientId, BigInt(channelName), password); + this.logger.info({ channelName }, "Joined channel"); } catch (err) { this.logger.error({ err, channelName }, "Failed to join channel"); } diff --git a/web/src/views/Setup.vue b/web/src/views/Setup.vue index 6bf2d23..1a7bb14 100644 --- a/web/src/views/Setup.vue +++ b/web/src/views/Setup.vue @@ -51,7 +51,7 @@