In order to send a message to Discord from Roblox, you will need to use HTTP-Service. HTTPService lets you communicate with API’s/etc, across the web.
In this case, since you are sending a message to a webhook, you will need to use the method POST.
Then, convert the lua table into a JSON table (data); which will be in the 2nd argument of the POST method.
Here is how you will send just a message:
local HTTPService = game:GetService("HttpService")
local proxy = "https://hooks.hyra.io"
local hook = ""
hook = string.gsub(hook, "https://discord.com", proxy)
local d = HTTPService:JSONEncode({
["content"] = "hey!"
})
HTTPService:PostAsync(hook, d)
Although, there is other table types you can use, such as embeds:
['embeds'] = {{
["image"] = {["url"] = image},
['title'] = "**"..title.."**",
['description'] = message,
['type'] = "rich",
["color"] = tonumber(0xffffff),
['fields'] = fields
}
},