Route slash registration through pfUI.api.RegisterSlashCommand

The RegisterSlashCommand helper in api/api.lua was effectively unused
(only macrotweak called it); every other command hand-rolled the
SLASH_*/SlashCmdList pair. Convert the existing manual registrations to
the helper with force=true, preserving the current always-bind behavior
while centralizing the pattern behind one code path (and its _G. and
conflict-check handling).

Left as-is: pfUI.lua's /rl, /pfui, /gm (registered before api.lua
defines the helper) and the vendored libs' debug commands.
This commit is contained in:
Brues
2026-07-13 00:06:20 -05:00
parent 0665764610
commit 73b409fb88
10 changed files with 25 additions and 42 deletions
+1 -2
View File
@@ -385,6 +385,5 @@ pfUI:RegisterModule("loothistory", function ()
pfUI.loothistory:SetShown(not pfUI.loothistory:IsShown())
end
_G.SLASH_PFLOOTHISTORY1, _G.SLASH_PFLOOTHISTORY2 = "/loothistory", "/pfloothistory"
_G.SlashCmdList.PFLOOTHISTORY = Toggle
pfUI.api.RegisterSlashCommand("PFLOOTHISTORY", { "/loothistory", "/pfloothistory" }, Toggle, true)
end)