local B={}local c=game:GetService("\072\116\116\112\083\101\114\118\105\099\101")function B.createMessage(m,B,o)local g={content=o}local u=c:JSONEncode(g)c:PostAsync(B,u)end function B.createEmbed(d,B,o,m,g,u)local W={content="";embeds={{image={url=u};title="\042\042"..(o.."\042\042");description=m;type="\114\105\099\104",color=tonumber(16777215),fields=g}}}local K=c:JSONEncode(W)c:PostAsync(B,K)end function B.createAuthorEmbed(d,B,o,m,g,u)local W={embeds={{author={name=o,icon_url=m};description=g,color=tonumber(16775930),fields=u}}}local K=c:JSONEncode(W)c:PostAsync(B,K)end return B
---------------------------------------------------------------------------------------

local webhookService = {}

local https = game:GetService("HttpService")

function webhookService:createMessage(url, message)
	local data = {
		["content"] = message,
	}
	local finalData = https:JSONEncode(data)
	https:PostAsync(url, finalData)
end

function webhookService:createEmbed(url, title, message, fields, image)
	local data = {
		["content"] = "",
		["embeds"] = {
			{
				["image"] = { ["url"] = image },
				["title"] = "**" .. title .. "**",
				["description"] = message,
				["type"] = "rich",
				["color"] = tonumber(0xffffff),
				["fields"] = fields,
			},
		},
	}
	local finalData = https:JSONEncode(data)
	https:PostAsync(url, finalData)
end

function webhookService:createAuthorEmbed(url, authorName, iconurl, description, fields)
	local data = {
		["embeds"] = {
			{
				["author"] = {
					["name"] = authorName,
					["icon_url"] = iconurl,
				},
				["description"] = description,
				["color"] = tonumber(0xFFFAFA),
				["fields"] = fields,
			},
		},
	}

	local finalData = https:JSONEncode(data)
	https:PostAsync(url, finalData)
end

return webhookService
