{link}: Trust Check Failed (HttpService)

Hi!

I am trying to make a Link Blocker Module work with our webhook.

Right now, it’s erroring for Trush Check Failed at line 29.
What’s wrong?
Thanks!

local module = require(7052867232)
module:SetMode('RemoveMessage') --[[
None: does nothing but links will still be detected
FilterLink: filters the link
RemoveMessage: removes the message
]]
local webhook = "lol i invalidated the link xd"
local http = game:GetService("HttpService")
module:SetCheck(function(player, url, message)
	return string.find(url, 'roblox%.com$') == nil
	-- return a boolean, above is a example which will not do anything to roblox.com links.
end)

module.Detected:Connect(function(player, url) -- a event, this is also optional
	local data ={
		['embeds'] = {{ 
			['color'] = 0000,        
			['tittle'] = "Link Sent, Player kicked.",
			['description'] = player.Name,
			['fields'] = {
				{
					['name'] = "Sent a link. Link: ",
					['value'] = url,
				}
			}
		}}
	}
	local newdata = http:JSONEncode(data)
	http:PostAsync(url,newdata)
	player:Kick("You have put in a link. Links are not permitted. If this is a mistake, contact us and rejoin. Your link has been logged.")
end)

module:Run() -- start
--[[
local url = "[Discord webhook app here]"
local http = game:GetService("HttpService")

game.Players.PlayerAdded:Connect(function(player)
	player.Chatted:connect(function(msg)

		local data ={
			['embeds'] = {{ 
				['color'] = 0000,        
				['tittle'] = "ChatLog",
				['description'] = player.Name,
				['fields'] = {
					{
						['name'] = "CHATTED IN GAME AND SAID;",
						['value'] = msg,
					}
				}
			}}
		}
		local newdata = http:JSONEncode(data)
		http:PostAsync(url,newdata)
	end)
end)



]]
1 Like

Can we see the url you’re using there?

Its the url the user posted.

This error usually appears when trying to send a http request to roblox.com.

I think you meant to PostAsync to webhook and not url

1 Like

Hey, just a heads up, you’ve got your webhook in that code sample. You should probably edit it out so people can’t abuse it.

1 Like

You’re right, thank you.

1 Like