refactor: centralize prefix resolution into CommandHandler

Replace all scattered prefix lookups across the codebase with a single
source of truth: CommandHandler.getPrefix(guildId).
This commit is contained in:
NoLogicAlan committed 2026-05-31 15:02:18 +03:00
1 parent 23d0dbc522
commit ba479e4c04
25 files changed
+155 -159

No files matched your search

+1 -1
View File
@@ -137,7 +137,7 @@ async function playStation(ctx, msg, radio, editTarget = null) {
if (current?.type === "radio" || hasRadioQueued) await p.switchRadio(radio);
else p.playRadio(radio);
const prefix = (() => { try { return ctx.handler?.getPrefix?.(msg?.channel?.channel?.guildId ?? msg?.message?.guildId) ?? "%"; } catch (_) { return "%"; } })();
const prefix = ctx.handler.getPrefix(msg?.channel?.channel?.guildId ?? msg?.message?.guildId);
const embed = new EmbedBuilder()
.setColor(getGlobalColor())
.setTitle(`📻 ${radio.detailedName}`)