--[[
	Discord - Roblox hookup
	ConfidentCoding
	Do not touch this script.
--]]


local webHook = {}
webHook.__index = webHook

function webHook.new(id,key) 
	local mt = setmetatable({id=id,key=key}, webHook) 
	return mt
end

function webHook:post(config,host)
	local data = nil
	local success = pcall(function()
		data = game:GetService("HttpService"):JSONEncode(config)
	end)
	if not success then warn("Webhook can't be converted to JSON") return end
	game:GetService("HttpService"):PostAsync("https://discordapp.com/api/webhooks/"..self.id.."/"..self.key,data)
end

return webHook
