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
}}
}}
}
banTarget:Kick()
local data = http:JSONEncode(banInfo)
http:PostAsync(url, data)
end)
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
end
end
BanFrame.Visible = false
ban.MouseButton1Click:Connect(function()
for _, v in pairs(BanFrame:GetChildren()) do
if v:IsA("TextButton") or v:IsA("TextBox") then
v.Visible = true
BanFrame.Visible = true
end
end
MainBan.MouseButton1Click:Connect(function()
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
end
end
end)
end)
the problem
https://gyazo.com/3f51e5bbaf775488d4c9053a2dc26172
the embed does not seem to load for some reason.
thanks in advance