fix: address Phase 5 review — use strict equality check in cmdMode

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
saopig1andClaude Opus 4.6 committed 2026-03-30 00:45:14 +08:00
1 parent 6692f49a85
commit e5d5185f14
1 file changed
+1 -1
+1 -1
View File
@@ -338,7 +338,7 @@ export class BotInstance extends EventEmitter {
rloop: PlayMode.RandomLoop, rloop: PlayMode.RandomLoop,
}; };
const mode = modeMap[cmd.args]; const mode = modeMap[cmd.args];
if (!mode) return "Usage: !mode <seq|loop|random|rloop>"; if (mode === undefined) return "Usage: !mode <seq|loop|random|rloop>";
this.queue.setMode(mode); this.queue.setMode(mode);
this.emit("stateChange"); this.emit("stateChange");
return `Play mode set to: ${cmd.args}`; return `Play mode set to: ${cmd.args}`;