6Square4
(Garchy)
1
Hello. I am passing this table through PostAsync (link works, tested with a basic text request.)
{
{
username = "Jackpot Win",
embeds = {
{
description = a.Name .. ' has won the Server Jackpot. [Minimum: 0. Maximum: 1Qd]',
fields = {
color = 16777215,
{
name = "Chance",
value = addtitle(chance)
},
{
name = "Total",
value = addtitle(jackpot.Total)
},
{
name = "Added",
value = addtitle(jackpot.Players[winner].Total);
}
}
}
}
}
}
and am getting HTTP 400 Bad request. Ideas?
1 Like
Diltz_3
(Diltz)
2
Convert it to JSON and validate your embeds on any discord embed generator.
Also, do you convert your data to JSON when sending POST request?
6Square4
(Garchy)
3
Yes.
game:GetService('HttpService'):PostAsync(link, game:GetService("HttpService"):JSONEncode(data));
Diltz_3
(Diltz)
4
Try to check your JSON validity in any embed generator for discord
6Square4
(Garchy)
5
Hmm, it just defaults it back to {
“embeds”: [],
“components”: []
} in the generator.
Should I form the embed in the generator, decode it, then paste that?
Diltz_3
(Diltz)
6
Yes, it’ll generate embed correct.
1 Like
6Square4
(Garchy)
7
Alright. I thought roblox sent data differently so thought that wouldn’t work. Thanks 
1 Like