mirror of
https://github.com/remix-bot/fluxer.git
synced 2026-11-24 06:01:44 -05:00
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:
1 parent
23d0dbc522
commit
ba479e4c04
25 files changed
+155
-159
No files matched your search
+1
-1
@@ -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}`)
|
||||
|
||||
Reference in new issue
Block a user