mirror of
https://github.com/ZHANGTIANYAO1/teamspeak-music-bot.git
synced 2026-10-02 04:52:50 +08:00
chore: add success log for numeric channel join
This commit is contained in:
1 parent
05f090d83a
commit
62b5b09857
3 files changed
+18
-17
No files matched your search
+16
-16
@@ -225,22 +225,22 @@ export class BotManager extends EventEmitter {
|
|||||||
const bot = new BotInstance({
|
const bot = new BotInstance({
|
||||||
id: saved.id,
|
id: saved.id,
|
||||||
name: saved.name,
|
name: saved.name,
|
||||||
tsOptions: {
|
tsOptions: {
|
||||||
host: saved.serverAddress,
|
host: saved.serverAddress,
|
||||||
port: saved.serverPort,
|
port: saved.serverPort,
|
||||||
queryPort: proto === "ts6" ? 10080 : 10011,
|
queryPort: proto === "ts6" ? 10080 : 10011,
|
||||||
nickname: saved.nickname,
|
nickname: saved.nickname,
|
||||||
// Reuse the stored identity so server groups assigned to this bot
|
// Reuse the stored identity so server groups assigned to this bot
|
||||||
// survive restarts — without this the TS server sees a new UID
|
// survive restarts — without this the TS server sees a new UID
|
||||||
// each connect and strips all previously granted groups.
|
// each connect and strips all previously granted groups.
|
||||||
identity: saved.identity || undefined,
|
identity: saved.identity || undefined,
|
||||||
defaultChannel: saved.defaultChannel || undefined,
|
defaultChannel: saved.defaultChannel || undefined,
|
||||||
channelId: saved.channelId || undefined,
|
channelId: saved.channelId || undefined,
|
||||||
channelPassword: saved.channelPassword || undefined,
|
channelPassword: saved.channelPassword || undefined,
|
||||||
serverPassword: saved.serverPassword || undefined,
|
serverPassword: saved.serverPassword || undefined,
|
||||||
serverProtocol: proto === "ts3" || proto === "ts6" ? proto : undefined,
|
serverProtocol: proto === "ts3" || proto === "ts6" ? proto : undefined,
|
||||||
ts6ApiKey: saved.ts6ApiKey || undefined,
|
ts6ApiKey: saved.ts6ApiKey || undefined,
|
||||||
},
|
},
|
||||||
neteaseProvider: this.neteaseProvider,
|
neteaseProvider: this.neteaseProvider,
|
||||||
qqProvider: this.qqProvider,
|
qqProvider: this.qqProvider,
|
||||||
bilibiliProvider: this.bilibiliProvider,
|
bilibiliProvider: this.bilibiliProvider,
|
||||||
|
|||||||
@@ -275,6 +275,7 @@ export class TS3Client extends EventEmitter {
|
|||||||
if (isNumeric) {
|
if (isNumeric) {
|
||||||
try {
|
try {
|
||||||
await clientMove(this.client, this.clientId, BigInt(channelName), password);
|
await clientMove(this.client, this.clientId, BigInt(channelName), password);
|
||||||
|
this.logger.info({ channelName }, "Joined channel");
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
this.logger.error({ err, channelName }, "Failed to join channel");
|
this.logger.error({ err, channelName }, "Failed to join channel");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,7 +51,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>默认频道ID(可选)</label>
|
<label>默认频道ID(可选)</label>
|
||||||
<input v-model="channelId" :disabled="!!defaultChannel" placeholder="如 1234" class="input" :class="{ disabled: !!defaultChannel }" />
|
<input v-model="channelId" :disabled="!!defaultChannel" placeholder="如 12" class="input" :class="{ disabled: !!defaultChannel }" />
|
||||||
</div>
|
</div>
|
||||||
<div class="btn-row">
|
<div class="btn-row">
|
||||||
<button class="btn-secondary" @click="currentStep = 0">上一步</button>
|
<button class="btn-secondary" @click="currentStep = 0">上一步</button>
|
||||||
|
|||||||
Reference in new issue
Block a user