so i was trying out some code with a webhook
but i couldnt get farther then this…
someone please help!
local d = {
['embeds'] = {{
['title'] = "Name: "..p.Name,
['description'] = {
"UserID: "..p.UserId,
"GraphicID: "..get,
"GroupRank: "..p:GetRankInGroup(group_ID),
"DisplyNme: "..p.DisplayName,
"AcountAGE: "..p.AccountAge
}
}}
}
local D = https_S:JSONEncode(d)
https_S:PostAsync(URL1, D)
i tested it without the description and it worked
I dont know the format of it though…
Edit: yes i know there are some spelling mistakes, those are intentional.
Edit2: i found this link to an embed visualizer, but im to stupid to figure it out… https://embed.discord.website/
edit3: Better title, old one was bad
Perhaps you should check the RoProxy documentation and make sure your request matches what the request should look like. An HTTP 400 error means that RoProxy (the server) didn’t understand your request perhaps the syntax is wrong.
After a debate with Chatgpt i have managed to find a solution!
ive used this format:
local d = {
embeds = {{
title = p.Name,
color = 0x90EE90, -- Light-green color
fields = {
{ name = "Display Name", value = p.DisplayName, inline = false },
{ name = "Graphic ID", value = get, inline = false },
{ name = "UserID", value = tostring(p.UserID), inline = false },
{ name = "Group Rank", value = tostring(p:GetRankInGroup(group_ID)), inline = false },
{ name = "Account Age", value = tostring(p.AccountAge), inline = false }
}
}}
}
if SendtoDiscord == true then
local D = https_S:JSONEncode(d)
https_S:PostAsync(URL1, D)
end