Hello, scripters,
I’ve been trying for quite a while to make this Roblox to discord chatlog embed work, but it’s not working. I’m getting a bad request on line 25 and I’m not sure what this issue is, if anyone could help me that’d be amazing. Thank you!
Script:
local Players = game:GetService("Players")
local http = game:GetService("HttpService")
local webhook = "[It's here I'm just not posting it on the forums]"
Players.PlayerAdded:Connect(function(plr)
plr.Chatted:Connect(function(msg)
local data =
{
["contents"] = "",
["embeds"] = {{
["title"]= plr.name,
["description"] = msg,
["type"]= "rich",
["color"]= tonumber(43643235),
["fields"]={
{
["name"]="Player has sent a message in game",
["value"]="Username: **"..plr.Name.."** User ID: **"..plr.UserId.."** has messaged in the game. Info: [Game Link](https://www.roblox.com/games/".. game.PlaceId..") | [Profile Link](https://www.roblox.com/users/"..plr.UserId.."/profile)",
["inline"]=true}}}}
}
http:PostAsync(webhook,http:JSONEncode(data))
end)
end)
If anyone knows how to fix this, or what’s wrong with it, you’d be a huge help.
This script was created by TheFutureNight
Thank you!
SwatBubbsly