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,7 +1,6 @@
|
||||
import { CommandBuilder } from "../src/CommandHandler.mjs";
|
||||
import { EmbedBuilder } from "@fluxerjs/core";
|
||||
import { getGlobalColor } from "../src/MessageHandler.mjs";
|
||||
import { logger } from "../src/constants/Logger.mjs";
|
||||
|
||||
const DEFAULT_ALIAS = "default";
|
||||
|
||||
@@ -112,7 +111,7 @@ export async function run(msg, data) {
|
||||
return msg.reply({ embeds: [new EmbedBuilder().setColor("#ff0000").setDescription(this.t(msg, "responses._common.noVoiceChannel"))] });
|
||||
}
|
||||
|
||||
const prefix = this.handler?.getPrefix?.(msg.message?.guildId) ?? "%";
|
||||
const prefix = this.handler.getPrefix(msg.message?.guildId);
|
||||
|
||||
if (subCommand === "set") {
|
||||
const timesRaw = data.get("times")?.value;
|
||||
|
||||
Reference in new issue
Block a user