Scripting error support with discord chat logs

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

I highly don’t recommend logging chatlogs, for a number of reasons including ratelimit, discord not being a place made to log and so on, chatlogs are the absolute worst as people chat A LOT and it will violate the ratelimit and discord may disable your account for abusing it’s API.

Just as @mradx has said, (apology for ping) , you shouldn’t do this. This could risk discord to ban webhooks in Roblox once again. And many players wish to keep their privacy for them, I would suggest to do it within a TextboxGUI instead of tracking the chat of players.

I agree with both of you, but it’s for a group with 109 people, 95% of people I know, and I have a chatlog, but I’m just looking for a way for that to go to discord so I can check when I’m on mobile, or am not able to go in-game for example.