Basically, I'm trying to make a webhook that will send all messages being sent in my roblox game to a channel in my discord server
(you may think this would be API abuse but I don't plan to have any more than 10 people in the game at once)
I think the problem could be the variables, but I'm not entirely sure, I'm a bit of a noobie with API.
**The code: **
game.Players:FindFirstChild().Chatted:Connect(function(msg)
local text = msg
local user = game.Players.LocalPlayer.Name
local http = game:GetService("HttpService")
local Data = {
["content"] = "`"..text.."`",
["username"] = user,
}
Data = http:JSONEncode(Data)
http:PostAsync("*webhook link redacted.*", Data)
end)

8 comments
is HttpEnabled set to true?
https://developer.roblox.com/en-us/api-reference/property/HttpService/HttpEnabled
yes, it is
I'm not familiar with discord's API, but are you certain that they use JSON and not some other format?
To me, that code looks fine, my guess is something on the other end is wrong.
im pretty sure they use json
Ok, well in the [REDACTED] webhook link, do they give you a custom webhook link or is it some generic one with a key they give you?
its a generic one thats given to me, i could send you the link if you got discord, my tag is Koyoka#2464