Error occurred while evaluating command string "kick ZzzZeeZee_ZzzZee dum" Unable to cast value to std::string ServerScriptService.Cmdr.Shared.Dispatcher:81 ServerScriptService.CmdrConfig.ModerationCmds.kickServer:17 function addlog ServerScriptService.CmdrConfig.ModerationCmds.kickServer:30 ServerScriptService.Cmdr.Shared.Command:140 function Run ServerScriptService.Cmdr.Shared.Dispatcher:79 ServerScriptService.Cmdr.Shared.Dispatcher:72 function EvaluateAndRun ServerScriptService.Cmdr:34
I'm running this function based on a command run on Cmdr, the function httpService:PostAsync is the line where it all goes wrong but I don't understand why, the function is below.
function addLog(targetId, moderatorId, reason)
local endpoint = "a valid URL"
local send_data = http:JSONEncode({
action = "kick";
targetId = targetId;
moderatorId = moderatorId;
reason = reason;
})
local headers = http:JSONEncode({
token = "my special token";
})
local res = http:PostAsync{
url=endpoint,
data=send_data,
headers=headers
}
return http:JSONDecode(res)
end
