-
What do you want to achieve?
I want to send over data to my discord server. -
What is the issue?
Sending the profile picture or fields causes the request to error. -
What solutions have you tried so far?
I’ve tried looking around the devForums, but none of their solutions worked for me.
game:GetService("Players").PlayerAdded:Connect(function(plr)
local data = {
["embeds"] = {
{
["title"] = "Player Joined!",
["description"] = plr.Name.." Joined The Game.",
["color"] = 4062976,
["url"] = "https://www.roblox.com/users/"..plr.UserId.."/profile",
["thumbnail"] = "https://www.roblox.com/Thumbs/Avatar.ashx?x=100&y=100&username="..plr.Name,
["fields"] = {
["name"] = "Account Age:",
["value"] = plr.AccountAge,
["inline"] = true
}
}
}
}
local finalData = http:JSONEncode(data)
http:PostAsync(url, finalData)
end)