Webhook not working

Hi, i’ve been making a webhook which sends roblox ban information from roblox to discord. It was working flawlessly a few minutes ago, but for some reason, a weird problem has occured.

Webhook code:

local http = game:GetService("HttpService")
local url = "my webhook url here"

local banModerator = "Banning Moderator: "
local plrBanned = "Banned Person: "

game.ReplicatedStorage.infoSender.OnServerEvent:Connect(function(banConductor, banTarget, banReason)
	local banInfo = {

		['embeds'] = {{

			['title'] = "Ban Information",
			['description'] = "Reason: "..banReason,

			['fields'] = {{

				['name'] = banModerator..banConductor.Name,
				['value'] = plrBanned ..banTarget.Name




		local data = http:JSONEncode(banInfo)
		http:PostAsync(url, data)


Local script:

local plr = game.Players.LocalPlayer

local nameShower = script.Parent.Ban_Panel.NameShower
local ban = nameShower.BanButton
local plrName = nameShower.PlrName

local BanFrame = script.Parent.Ban_Panel.BanFrame
local MainBan = BanFrame.BanButton
local reason = BanFrame.TextBox

plrName.Text = plr.Name

local objVal = Instance.new("ObjectValue")
objVal.Parent = ban
objVal.Value = plr

for _, v in pairs(BanFrame:GetChildren()) do
	if v:IsA("TextButton") or v:IsA("TextBox") then
		v.Visible = false

BanFrame.Visible = false

	for _, v in pairs(BanFrame:GetChildren()) do
		if v:IsA("TextButton") or v:IsA("TextBox") then
			v.Visible = true
			BanFrame.Visible = true
		game.ReplicatedStorage.infoSender:FireServer(objVal.Value, reason.Text)
		for _, v in pairs(script.Parent:GetDescendants()) do
			if v:IsA("Frame") or v:IsA("TextButton") or v:IsA("TextBox") or v:IsA("TextLabel") then
				v.Visible = false

the problem

the embed does not seem to load for some reason.

thanks in advance

Discord Webhooks wont work in a live game since Discord actively blocks Roblox’s server user-agent

No point developing a feature like this.

The reason is works in Studio is because it’s coming from your machine, not Roblox’s servers.

1 Like

Well thats a big bummer, thanks for the information

This post was very helpful for me too. Its a simple proxy that will let you use your webhook code like nothing happened. I use it for my feedback system. All fine and good as long as you don’t send too many requests

1 Like

If this feature is really needed, you can always try a logging service like trello for example.

Oh, thank you for the help! im pretty new to networking in luau so I did not know this, Thanks :slight_smile:

Also can I somehow send the data to a MySQL Database and then send it to discord from mySQL? (Idk if this is even possible because i’ve used an external database like once)

Pretty sure it is but then you have to set up your own server and all that jargon so unless you wanna mess with that whole thing, probably not the best choice.