mirror of
https://github.com/ZHANGTIANYAO1/teamspeak-music-bot.git
synced 2026-12-03 03:12:51 +08:00
Integrate QQ renewal and enforce music account assignment rules
This commit is contained in:
commit
0808cde447
27 files changed
+1501
-76
No files matched your search
+4
-2
@@ -106,9 +106,11 @@ export function createBotRouter(
|
||||
|
||||
const hasAutoPause = typeof autoPauseOnEmpty === "boolean";
|
||||
const hasLocalAudioEnabled = typeof localAudioEnabled === "boolean";
|
||||
// Per-user music accounts: admin-only toggle (this route already requires
|
||||
// bot.manage). Strictly boolean — anything else leaves the value alone.
|
||||
const hasPerUserMusicAccounts = typeof perUserMusicAccounts === "boolean";
|
||||
if (hasPerUserMusicAccounts && req.user?.role !== "admin") {
|
||||
res.status(403).json({ error: "forbidden" });
|
||||
return;
|
||||
}
|
||||
|
||||
if (hasIdle) config.idleTimeoutMinutes = idleTimeoutMinutes;
|
||||
if (hasAutoPause) config.autoPauseOnEmpty = autoPauseOnEmpty;
|
||||
|
||||
Reference in new issue
Block a user