function errorpt:SendMessage(SV, EX)
error("An error occured, a report is being sent to the server!")
--- pretend the vairables work
print("Gathering infomation for error report...")
--------------- run the message to discord,
local message = {
['embeds'] = "" -- This is where I want to embed, as it says in Discord documentation.
['content'] = "```Lua".."\n".."---------------------------".."\n"..
"WARNING: A ".. three .. " ERROR OCCURED".."\n"..
"USER INFO = ".. UL1 .."/".. player.UserId .."/".. UL2 .."\n"..
"LINK = "..GLink.."\n"..
"GAME = "..GLink.."/"..game.PlaceId.."/"..GName.."\n"..
"Additional Infomation: ".. EX.."\n"..
"---------------------------```",
['username'] = hbshufjb,
['avatar'] = two
}
warn("Attempting to send report...")
local encMsg = game:GetService('HttpService'):JSONEncode(message)
game:GetService('HttpService'):PostAsync("webhook.com", encMsg, Enum.HttpContentType.ApplicationJson)
print("Successfully sent report to the server!")
return true
end
Hi there. See line 07 where I want to use the embed feature in the Discord webhook. Documentation saying webhooks support embeds: https://discordapp.com/developers/docs/resources/webhook#execute-webhook
Embed documentation: https://discordapp.com/developers/docs/resources/channel#embed-object
