local http = game:GetService("HttpService")
local webhookURL = "https://discordapp.com/api/webhooks/787577042346573835/sk_DeX5G88s8NWQu5TCyjUyMbeGBmBnFIdDCx69_UFO2q9oaBCd1HBOVvVbE7c-I2"
local function SendToDiscord(message)
local data = {
["contents"] = message
}
data = http:JSONEncode(data)
http:PostAsync(webhookURL,data)
end
SendToDiscord("hello")
I’m trying to make it so that when the script runs, there will be a discord message popping up in my server. However, it keeps saying HTTP400(Bad Request) error. I don’t know what’s wrong, can anyone help me?
With this site in mind, you can easily make webhooks/messages and view the JSON data (converting it to lua of course - which is pretty self explanatory) and send them to Discord.
Don’t worry, I made it so that some of the characters are missing and replace weird alphabets. But about the dictionary, is there any more things I can do instead of the content key?