Chat Logs working only in Roblox Studio

Hello everyone! I was trying to make Chat Logs for my Discord server and faced such a problem that if I send a message while in Roblox Studio, everything works fine, but if I send a message in the game itself, nothing will happen. I hope someone - will help solve the problem

And here is my script :

Script

local https = game:GetService(“HttpService”)

local webhook = “webhook url”

function sendDiscordMessage(message, name, picture)

local info = {
	content = message,
	username = name,
	avatar_url = picture
}

local encoded = https:JSONEncode(info)

https:PostAsync(webhook, encoded)

end

game.Players.PlayerAdded:Connect(function(player)

local name = player.DisplayName .. " (@" .. player.Name .. ")"

local imageUrl = "http://www.roblox.com/Thumbs/Avatar.ashx?x=100&y=100&Format=Png&Type=AvatarHeadShot&userId=" .. player.UserId

player.Chatted:Connect(function(message)


	sendDiscordMessage(message, name, imageUrl)
end)

end)

1 Like

Discord Webhooks are no longer supported at this time.

1 Like

You could use a proxy to send a webhook, so I wouldn’t say it’s entirely not supported.

1 Like

There are tons of available discord proxies you can use to proxy your webhook requests.

1 Like