Open in the app to sign in, vote and reply

Suggestions · Done

API Suggestion - Modify Commands (name, function, prefixes, etc)

· · 6 votes · 1 comments · imported from Discord · edited · marked done by Team on 2026-09-23

i'm not sure if this is really allowed, make a function that allows you to MODIFY existing commands (their name, function, prefixes, etc.)
it would be something like

ModifyCommand(commandName, data)

ModifyCommand(fly, {
        Name = "example";
        Aliases    = {};
        Prefixes = {};
        Rank = 3;
        RankLock = false;
        Loopable = false;
        Tags = {};
        Description = "";
        Contributors = {"awdawdkoawdkowdako"};
        --
        Args = {"Player", "Speed"};
        ClientCommand = false;
        FireAllClients = false;
        CanUndo = false;
        Function = function(speaker:Player, args)

        end;
    };)

Solved by Team · See the solution

Comments

Team · Solution

this is now possible in v2! there's two ways depending on how much you want to change:

for a small change, 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 = {
    fly = function(command)
        local originalRun = command.run
        command.run = function(task)
            -- your own code, then hand back to the built-in
            print(task.caller.Name, "used fly")
            originalRun(task)
        end
    end,
},

for a full re-write, first exclude the internal one with exclude = {"fly"} in ConfigCommandsMod, then create your own "fly" command, for example under your Custom command module. you then have full control over its name, aliases, args, tags, run, etc

more details here too including a feature-coming-soon to make this even easier: https://forum.hdadmin.com/p/epw8s9r3li05kwx

docs for creating commands are at hdadmin.com/commands and hdadmin.com/custom-commands