Webhook feedback system not working

I have a made a GUI in-game that players can use to give me feedback which is supposed to be sent to a Discord server but that doesn’t happen.

There are no errors in the output and HttpEnabled is true.

LocalScript:

    --//Variables\\--

    local gui = script.Parent
    local frame = gui.Frame
    local contimg = gui.Controls
    local closebtn = contimg.Close
    local contbtn = frame.ControlsBtn
    local telebtn = frame:WaitForChild("TeleBtn")
    local remotes = game.ReplicatedStorage:WaitForChild("RemoteEvents")
    local teleplayerRemote = remotes:WaitForChild("TeleportPlayer")
    local player = game.Players.LocalPlayer
    local noblimpRemote = remotes:WaitForChild("NoBlimp")
    local message = gui:WaitForChild("Message")
    local canTeleport = gui:WaitForChild("CanTeleport")
    local damageRemote = remotes:WaitForChild("PlayerTakenDamage")
    local feedbackBtn = frame:WaitForChild("FeedbackBtn")


    contbtn.MouseButton1Down:connect(function()
    	contimg:TweenPosition(UDim2.new(0.257, 0, 0.249, 0))
    end)

    closebtn.MouseButton1Down:connect(function()
    	contimg:TweenPosition(UDim2.new(0.257, 0, -1, 0))
    end)


    --//Functions\\--

    local function teleport()
    	teleplayerRemote:FireServer(player)
    end

    telebtn.MouseButton1Down:connect(function()
    	if canTeleport.Value == true then
    		canTeleport.Value = false
    	teleport()
    	else
    		telebtn.Text = "You can't teleport right now."
    		wait(4)
    		telebtn.Text = "Teleport To Blimp"
    		
    		end
    end)

    noblimpRemote.OnClientEvent:connect(function()
    	message.Text = "No blimp found"
    	message.Visible = true
    	wait(3)
    	message.Visible = false
    	message.Text = ""
    end)


    damageRemote.OnClientEvent:connect(function()
    	if canTeleport.Value == true then
    	canTeleport.Value = false
    	message.Text = "You cannot teleport when in combat, coward"
    	message.Visible = true
    	wait(3)
    	message.Visible = false
    	message.Text = ""
    	end
    end)












    --//Feedback\\--

    --//Variables\\--

    local feedbackFrame = gui:WaitForChild("FeedbackFrame")
    local sendButton = feedbackFrame:WaitForChild("SendButton")
    local feedbackBox = feedbackFrame:WaitForChild("FeedbackBox")
    local exit = feedbackFrame:WaitForChild("Exit")
    local http = game:GetService("HttpService")
    local sendFeedbackRemote = remotes:WaitForChild("SendFeedback")

    --//Functions\\--

    local function sendFeedback()
    	if not feedbackBox.Text == "Please type your feedback here" or not "" then

    sendFeedbackRemote:FireServer(player,feedbackBox)

    	else
    		feedbackBox.Text = "You didn't type anything..."

    	end
    	end

    local function openGui()
    	feedbackFrame:TweenPosition(UDim2.new(0.359, 0 ,0.232, 0))
    	
    end

    local function closeGui()
    	feedbackFrame:TweenPosition(UDim2.new(0.359, 0 ,-1, 0))
    end

    feedbackBtn.MouseButton1Down:connect(function()
    	openGui()
    end)


    exit.MouseButton1Down:connect(function()
    	closeGui()
    end)


    sendButton.MouseButton1Down:connect(function()
    	sendFeedback()
    	sendButton.Visible = false
    	feedbackBox.Text = "Thank you for giving your feedback!"
    	wait(3)
    	feedbackBox.Text = "Please type feedback here"
    	wait(120)
    	sendButton.Visible = true
    end)

Server Script (Inside ServerScriptService):

--//Made by shish_kebab4\\--


--//Variables\\--

local remotes = game.ReplicatedStorage:WaitForChild("RemoteEvents")
local sendFeedbackRemote = remotes:WaitForChild("SendFeedback")
local http = game:GetService("HttpService")
local url = ""


--//Function\\--

sendFeedbackRemote.OnServerEvent:connect(function()

local Data = {
	["content"] = "hello"
}


local newData = http:JSONEncode(Data)

http:PostAsync(url, newData)

	end)
1 Like

Unless this has at some point been reverted, to use webhooks on Discord through roblox, you need to use a proxy server. More info can be found here:
https://devforum.roblox.com/t/discord-integration-a-guide-on-using-discord-through-roblox-updated/47090/66

Discord blacklisted requests from ROBLOX due to too many developers not respecting the API limitations. If you wish to proceed with making a Discord integration you will need to create a proxy and make sure you are respecting the API rate limits.

Here’s the code now. I changed “https://discordapp.com” to “https://discord.osyr.is” like it said but it still doesn’t work

    --//Made by shish_kebab4\\--


--//Variables\\--

local remotes = game.ReplicatedStorage:WaitForChild("RemoteEvents")
local sendFeedbackRemote = remotes:WaitForChild("SendFeedback")
local http = game:GetService("HttpService")
local url = ""


--//Function\\--

sendFeedbackRemote.OnServerEvent:connect(function(player, feedbackBox)

local Data = {
	["content"] = feedbackBox.Text
}


Data = http:JSONEncode(Data)

http:PostAsync(url, Data)
print("message sent")
	end)

Firstly, remove the webhook in your post IMMEDIATELY. If someone sees this post, since this is public, they can easily spam your webhook.

Back on topic, though, you should do what @SkyDiver051202 said and use a proxy.

Edit: try removing the https:// at the beginning of your webhook url.

Can you see on your proxy end what is being received from roblox, sent to discord, received from discord, and sent to roblox?

Note that when dealing with user text input you must filter it.

Feedback is no exception - young players may give you contact details or other private information. So make sure you filter that before posting it.

It prints “message sent” but no message pops up in the discord server.