You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? I want to send an embed to a Discord server using a webhook through a proxy.
-
What is the issue? I get an
HTTP 400 (Bad Request)
error whenever the button is clicked on.
local HTTPService = game:GetService("HttpService")
local URL = "https://hooks.hyra.io/api/webhooks/youcannotaccessmywebhookthateasily"
script.Parent.MouseClick:Connect(function(player)
local Data = {
["embeds"] = {
["title"] = "Button was clicked!",
["description"] = player.Name.." clicked the button!",
["color"] = 15158332
}
}
local JSON = HTTPService:JSONEncode(Data)
local success, errormessage = pcall(function()
HTTPService:PostAsync(URL, JSON, Enum.HttpContentType.ApplicationJson)
end)
if success then
warn("Webhook was successfully sent over!")
else
warn(errormessage)
end
end)
Maybe I should use a different proxy? What should I use?