My discord webhook doesn't work

My apologies, change Data in table.insert to data, case sensitive, my bad.

1 Like

Already did lul, but same error :confused:

Try remove one of the { from {{ and }}

1 Like

It works with Color3.new :+1: but itā€™s okay lol

It working but now http 400 bad request cuz we removed {{ and }}

Dont remove {{ and }}, just remove one of the brackets so it is only a single bracket rather than two.

Itā€™s what i did lul but http 400 bad request

Okay, well add that bracket back again, in the table insert use the current table as this data["embeds"][1]["fields"]

1 Like

now i found out the new problem, it works but now there an problem :

image

It doesnā€™t add the ā€œ,ā€ at end of }

What exactly are you printing out?

for k, d in pairs(getfields) do

print(d)

end

It should do that automatically when you do table.insert

But it doesnā€™t :thinking: maybe there something to do?

When you are checking the field names you shouldnā€™t do them like that, maybe try this?

table.insert(getfields, {["name"] = tostring(field1Name), ["value"] = tostring(field1Val), ["inline"] = false})

1 Like

Iā€™m gonna try :slight_smile: thank you for your help too :smiley:

Youā€™re welcome, if it helped then feel free to mark it as the solution, if you have any further questions/problems feel free to reply and iā€™ll try my best to assist.

1 Like

Thank you very much you saved me :smiley: it worked tysm

I got another question lol, how i can do that?

if getimage ~= nil then
   table.insert(data["avatar_url"], getimage) -- getimage is a function
end

Edit: Here the solution:

data["avatar_url"] = tostring(getimage)

and getimage:

https://www.roblox.com/headshot-thumbnail/image?userId="..p.UserId.."&width=420&height=420&format=png

1 Like