Add Example server script file for demonstration

This commit is contained in:
Sovereignty 2025-04-26 16:13:32 +00:00
parent 29d077126f
commit b91d1e3d98

View file

@ -0,0 +1,28 @@
local errorPopper = require(game:GetService("ServerStorage").ErrorPopper)
--Both SetURL and CustomFields must be called prior to starting the ErrorPopper module.
errorPopper.SetURL("https://discord.com/api/webhooks/...")
--CustomFields returns a table containing a single chainable method called add.
--The order of .add method chaining dictates the embeded message display order for each field.
errorPopper.CustomFields()
.add({
["name"] = "Example",
["value"] = function()
return "Value"
end,
["inline"] = false
})
--Start listening for errors and sending webhook messages.
errorPopper.Start()
--
--[[ Or, in the event you have no custom fields. ]]
--
errorPopper
.SetURL("https://discord.com/api/webhooks/...")
.Start()