How to make webhook look better

local httpService = game:GetService("HttpService")

local PlayerTimes = {}


game.Players.PlayerAdded:Connect(function(player)
	httpService:PostAsync("webhook",
		httpService:JSONEncode({
			content = player.Name .. " has joined the game!"
		})
	)
	PlayerTimes[player] = tick()
end)

game.Players.PlayerRemoving:Connect(function(player)
	if PlayerTimes[player] then
		print(math.floor(tick() - PlayerTimes[player]))
		httpService:PostAsync("webhook",
			httpService:JSONEncode({
				content = player.Name .. " has left the game. Duration time: " .. math.floor(tick() - PlayerTimes[player])
			})
		)
	end
	PlayerTimes[player] = nil
end)

As title said, I want to make webhook text look better. For context, look at screenshot.
image

You can use the documentation to add extra parameters to create the “better looking webook”, known as an embed.

Thank you, I was looking for it but I couldnt find it.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.