From a2014502d51b54605df19ad9224d059b6f7556bc Mon Sep 17 00:00:00 2001 From: Linden <65407488+thelindat@users.noreply.github.com> Date: Tue, 25 Oct 2022 03:06:04 +1100 Subject: [PATCH] refactor(addCommand): send raw input to callback Resolves #101, just use a pattern or split the string. --- imports/addCommand/server.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/imports/addCommand/server.lua b/imports/addCommand/server.lua index 182b995..ebace51 100644 --- a/imports/addCommand/server.lua +++ b/imports/addCommand/server.lua @@ -47,7 +47,7 @@ function lib.addCommand(group, name, callback, parameters, help) else chatSuggestion(name, parameters, help) - RegisterCommand(name, function(source, args) + RegisterCommand(name, function(source, args, raw) source = tonumber(source) --[[@as number]] if parameters then @@ -86,7 +86,7 @@ function lib.addCommand(group, name, callback, parameters, help) end end - callback(source, args) + callback(source, args, raw) end, group and true) name = ('command.%s'):format(name)