So I have this script that i have in my ServerScriptService that was originally a trello logger, and I tried changing it to discord. I have tried to get logs and it does not work, I have no idea if its a adonis update or if this just doesn’t work, any help?
local HttpService = game:GetService("HttpService")
function SendMessage(arguments)
local myTable = {}
myTable["content"] = arguments
myTable["username"] = "Log Bot" --player.Name
local myTableJSON = HttpService:JSONEncode(myTable)
myTableJSON = HttpService:JSONEncode(myTable)
HttpService:PostAsync(Url, myTableJSON)
end
server = nil
service = nil
return function()
service.Events.CommandRan:connect(function(p,msg,command,args,index,table,ran,error)
if ran and Url then
local arg = ""
if args then
for i,v in pairs(args) do
arg = arg..","..v
end
end
SendMessage(tostring(p)..": "..msg,
"--------------------------------------------"..
"\nPlayer: "..tostring(p)..
"\nMessage: "..tostring(msg)..
"\n"..
"\nCommand: "..tostring(command)..
"\nArgs: "..tostring(arg)..
"\n"..
"\nTime: "..tostring(service.GetTime())..
"\nSuccessful: "..tostring(ran)..
"\nError: "..tostring(error)..
"\n--------------------------------------------")
end
end)
end
Oh, I didn’t understand the debugging part, I understand prints. But I found the problem being the plugin, the code doesn’t work due to all of these scripts being for the outdated version of adonis.