Discord Webhook Problem

Hi! For the past 3-4 hours I have been working on this single webhook script trying to get it to work, but it just won’t! It gives out no errors and I have tried removing prints and such. Not a thing happens. I’ve also tried to remove the canary on the link. Any help is appreciated!

game.ReplicatedStorage.AppCenterPD.OnServerEvent:Connect(function(plr, q1q, q2q, q1a, q2a)

local HttpService = game:GetService("HttpService")

webhook = "https://canary.discordapp.com/api/webhooks/hidden/hidden" -- I tried this without the canary.
	local data = {
		["embeds"] = {{
			["title"] = " ",
			["description"] = "**Application Submitted** \n *Type:* PD \n *Q1:* "..q1q.."\n"..q1a.."\n *Q2:* "..q2q.."\n"..q2a
			}}
	}
	
	HttpService:PostAsync(webhook, HttpService:JSONEncode(data))
end)
1 Like

Based on the name of the remote, I’m going to assume this is for an application center?

Can you show the code for the client (script that fires the remote)?

Yes,

local PD = script.Parent.Parent
local questions = PD.questions
local submit = PD.submit
local q1 = questions.q1
local q2 = questions.q2



submit.MouseButton1Click:Connect(function()

local user = game.Players.LocalPlayer.Name
local q1q = q1.question.Text
local q2q = q2.question.Text
local q1a = q1.answer.Text
local q2a = q2.answer.Text

game.ReplicatedStorage.AppCenterPD:FireServer(q1q,q2q,q1a,q2a)
game.Players.LocalPlayer:Kick("Completed application!")


end)
1 Like

Comment this out and try again. I just sent a Http request to my personal webhook and it seemed to work.

4 Likes

Seemed to work! I guess I just need to add a wait(2) so it can process the event. Thank you!

2 Likes

Rather than using a RemoteEvent, use a RemoteFunction. This will allow yield the clients code until the web request has been processed. It’ll also allow you to return information, if there is an error, to the client so that you don’t kick them if it fails.

3 Likes