Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

"Http 404 (Bad Request)" When attempting to use a Discord webhook. Can someone help?

Asked by 4 years ago
Edited 4 years ago

So I have came up with the idea to have a Roblox place that you can send messages to a discord server from. Only thing is, I am getting an http 404 error, I have used the Discord copy paste button so I don't think that it is a problem with the link. Here is the script

script.Parent.MouseButton1Click:Connect(function()
local http = game:GetService("HttpService")
local Data = {
    ["content"] = (TextBox.Text)
}

Data = http:JSONEncode(Data)

http:PostAsync("https://discordapp.com/api/webhooks/(placeholder for publication purposes)", Data)
end)

I have no idea what is going on, can someone help?

(edit) sorry im dumb, i cant format well lol

Im also getting a too many requests error, so I don't know if this is discord or roblox sided.

0
put it in a lua code block please Lyphios 77 — 4y
0
alright Cryptic_Here 0 — 4y
0
I have a feeling that it has something to do with the string, but then how would I get a variable output in the discord server? Cryptic_Here 0 — 4y
0
Is it because you reasign "Data" by doing "Data = http:JSONEncode(Data)"? tictac67 96 — 4y

Answer this question