local handle = http.get("https://raw.githubusercontent.com/Wendelstein7/DiscordHook-CC/master/DiscordHook.lua")
local code = handle.readAll()
handle.close()
local DiscordHook = load(code,"DiscordHook.lua",nil,_ENV)()

webhookurl = "WEBHOOKURL"
name = "NAME"
avatarurl = "AVATARURL"

local success, hook = DiscordHook.createWebhook(webhookurl)
if not success then
    error("Webhook connection failed! Reason: " .. hook)
end

print("Name: " .. name)
print("AvatarURL: " .. avatarurl)
print("WebhookURL: " .. webhookurl)

function x()
    print("Message: ")
    message = io.read()
    hook.send(message, name, avatarurl)
    x()
end

x()