Hello guys,
I’m having some problems with my In-Game feedback system. It just stopped working without a reason. Now when i try to send a message with it, I get an HTTP 400 error.
Please notice that this script used to work fine before, so I really don’t get what’s wrong with it.
Here’s my script:
local http = game:GetService("HttpService")
local WebhookURL = "LinkHere"
local filteringFunction = game.ReplicatedStorage.FilteringFunction
local ChatService = game:GetService("Chat")
local GetName = game:GetService("MarketplaceService"):GetProductInfo(game.PlaceId)
local stringToFormat = "!%A - %x - %X UTC"
local timestamp = os.time()
local dateandtime = os.date(stringToFormat, timestamp)
function filteringFunction.OnServerInvoke(player, msg)
local FilteredMessage = ChatService:FilterStringForBroadcast(msg, player) --Filters the message, before sending it to the webhook.
local Data =
{
["embeds"] = {{
["author"] = {
["name"] = GetName.Name,
["url"] = "https://www.roblox.com/games/" .. tostring(game.PlaceId),
["icon_url"] = "https://t4.rbxcdn.com/e8db7615a6d2e53bd6e6d6606460beb1",
},
["title"] = "Message:",
--["url"] = "https://www.roblox.com/users/" .. tostring(player.UserId) .. "/profile",
["description"] = FilteredMessage,
["type"] = "rich",
["color"] = tonumber(0x30B699),
["thumbnail"] = {url = game.Players:GetUserThumbnailAsync(player.UserId, Enum.ThumbnailType.HeadShot, Enum.ThumbnailSize.Size420x420)},
["fields"] = {
--{
-- ["name"] = "Message:",
-- ["value"] = FilteredMessage,
-- --["inline"] = true
--},
{
["name"] = "Sent by",
["value"] = tostring(player.Name .. " (https://www.roblox.com/users/" .. player.UserId .. "/profile)"),
--["inline"] = true
},
{
["name"] = "Time Data",
["value"] = tostring(dateandtime),
--["inline"] = true
}
}
}}
}
local Embed = http:JSONEncode(Data)
http:PostAsync(WebhookURL, Embed)
end
What’s the problem in your opinion? How could I fix that?
As always, thanks in advance for your help.