Open in the app to sign in, vote and reply

Suggestions · Considering

A way to override existing commands in HD Admin v2

· · 7 votes · 2 comments · imported from Discord · marked considering by Team on 2026-09-23

I was thinking about modifying the music command in HD Admin to use a more modern audio system, so I was wondering if it would be possible to override existing commands in HD Admin v2.

Comments

Team ·

there's currently two ways depending on what you need to do:

for a small change, the easiest thing to do is use modify in your loader's ConfigCommandsMod. it hands you the command table before it loads, so you can swap out its run (or wrap the original), for example:

modify = {
    music = function(command)
        local originalRun = command.run
        command.run = function(task)
            -- your own code, then hand back to the built-in
            print(task.caller.Name, "is playing", task:getArg("SoundId"))
            originalRun(task)
        end
    end,
},

for a full command re-write, you have to first exclude internal one by doing exclude = {"music"} in ConfigCommandsMod, then you can create a new "music" command entirely, for example under your Custom command module.

the exclude step is required right now, but i'd like to improve this in the future by having any custom command you write replace the internal one straight away (without this unnecessary step), so thanks for the suggestion. will share an update here when that's finished.

you can also find the docs for creating commands at hdadmin.com/commands and hdadmin.com/custom-commands

· · in reply to ForeverHD

Thanks; I ended up asking for this because I'm interested in using the latest audio API.