Hello, i have this webhook which shows completions of an obby, it works but the only problem is that if someone beat the obby then instead of saying they beat the obby in discord. it will send a message for everyone in the server.
Here is how this works I have a script named TouchyScript (which is in StarterPlayerScripts) which gets a response from a FilteringFunction (which is in Replicated Storage) which will then go to a script called Server Handler (in ServerScriptService) which will display a message in the discord that a person has beaten the obby
here are the scripts
TouchyScript : ps : game.Workspace.["ToE Winpad"].Part is the part that the player touchs for the message to be sent.
local part = game.Workspace["ToE Winpad"].Part
local debounce = false
function onTouched()
if not debounce then
debounce = true
local response = game.ReplicatedStorage.FilteringFunction:InvokeServer()
wait(1.5)
debounce = false
end
end
part.Touched:connect(onTouched)
Server Handler :
local webhook = "https://discordapp.com/api/webhooks/638715706694828055/wkouBmQAhXH8gdNpe1stXffg6o5hXAy7130J_xhW_yBGRpdcSp-021wD66kIwFOB"
local filteringFunction = game.ReplicatedStorage.FilteringFunction
local HTTP = game:GetService("HttpService")
function filteringFunction.OnServerInvoke(player, msg)
local payload = HTTP:JSONEncode({
content = player.name.." Has Beaten Tower of Easiness",
username = player.Name;
avatar_url = "http://www.roblox.com/Thumbs/Avatar.ashx?x=100&y=100&Format=Png&userId="..player.UserId
})
HTTP:PostAsync(webhook, payload)
return "Feedback recieved!"
end
If you need more information please ask,
all answers are extremely appriciated.

4 comments
If you only want certain people to see it, you could just make a webhook in a private channel... if you've looked at the parameters allowed for a webhook you'd see you cant send it only to a certain person.
Why would you leak your webhook..
And why not just use a bindble function?
i tried this but it seem not to work for me i put everything by the name and the same script i only changed the webhok. what should i do?