Way to change discord webhook avatar through data

Is there a way to make it so that you can also set the webhook’s profile picture through a post request?

My code right now:

--//Services
local Players = game:GetService("Players")
local HttpService = game:GetService("HttpService")

--//Variables
local DiscordWebhook = "" --//Deleted so I don't get webhook raided

--//Functions
Players.PlayerAdded:Connect(function(player)
	player.Chatted:Connect(function(message)
		local userId = player.UserId
		
		local Data = {
			["avatar"] = "https://www.roblox.com/headshot-thumbnail/image?userId=".. userId .."&width=420&height=420&format=png",
			["username"] = player.Name,
			["content"] = message
		}
		
		Data = HttpService:JSONEncode(Data)
		HttpService:PostAsync(DiscordWebhook, Data)
	end)
end)

For example instead of this profile picture:
image

Could I make it so that I can set the profile picture of the webhook through the post request?

Try avatar_url instead of just avatar.

1 Like

Thanks, it worked. Have a good day.

1 Like

You aswell! I recommend using a discord webhook embed generator, and using the json code given to you!