Hi!
I'm really interested in learning how these Discord webhooks work, it's supposed to be simple where you simply send JSON to a server. I have gotten this to work with a simple script.
local httpService = game:GetService("HttpService")
local data = {
content = "lamb"
}
local json = httpService:JSONEncode(data)
local location = "https://discordapp.com/api/webhooks/[CENSORED]"
function send()
httpService:PostAsync(location, json)
end
send()
The script above will simply send a message saying 'lamb' to the server.
Now, this is the Discord API reference for the embed here and this is the Discord API reference for the core request.. It shows you how to send requests to Discord and so on..
When I attempt to use this script, it simply doesn't work. It returns error 400 stating that it is a bad request. Is there something wrong with my script or am I doing something wrong with the actual API? You can make fancy messages with the 'embeds' but whenever I attempt to use it, it doesn't work..
local httpService = game:GetService("HttpService")
local data = {
embeds = {
title = "aaa"
}
}
local json = httpService:JSONEncode(data)
local location = "https://discordapp.com/api/webhooks/[CENSORED]"
function send()
httpService:PostAsync(location, json)
end
send()
Any help regarding this script would be extremely helpful. Thanks.

1 comment
Heh, I had this problem too. let me help