This is a simple Discord webhook class I made based on discord.js’s MessageEmbed Class for Roblox since I noticed how hard it is to craft a nice looking embed from pure JSON for new users.
.setAuthor(Name, ImageUrl, Hyperlink).setTitle(Title).setUrl(Hyperlink).setDescription(Description).setFooter(Footer, ImageUrl).setTimestamp(osTimeDate, parser?).addField(Name, Value, Inline?).setColor(HexColor).setThumbnail(ImageUrl, Width, Height).setImage(ImageUrl, Width, Height)
Example Script
local Classes = script.Classes;
local DiscordEmbed = require(Classes.Embed);
local Webhook = require(Classes.WebhookClient);
local TestWebhook = Webhook("LINK");
TestWebhook.send(
DiscordEmbed()
.setUrl("https://roblox.com")
.setColor("#ffaa00")
.setAuthor('ROBLOX', 'https://tr.rbxcdn.com/c3ee609e91804ee2f15c6375355a381a/150/150/AvatarHeadshot/Png')
.setTitle("Example Embed")
.setDescription('This is the embed\'s description!')
.addField("Inline Test", "This is an inline field", true)
.addField("Inline Test #2", "This is another inline field", true)
.addField("Normal Test", "This is a normal field", false)
.setThumbnail('https://tr.rbxcdn.com/36aad500015617f31470126e48573cbe/150/150/AvatarHeadshot/Png')
.setImage('https://blog.roblox.com/wp-content/uploads/2017/01/Roblox_Logo_Square_Image.jpg')
.setTimestamp(os.date("!*t"), true)
.setFooter("Sent from Lua Ingame")
)

