So i am Using a webhook to Discord that sends me data when someone purchased a gamepass or when someone donates. Now, I need to Get error info when a Error occured. so i made a script that looks like this:
local url = "https://discordapp.com/api/webhooks/NOTSHOWINGTHEWEBHOOK/XXXXXXXXXXXXXXXXXXXX" local http = game:GetService("HttpService") while wait(3) do -- Repeats And tries to detect errors in the script game:GetService("ScriptContext").Error:Connect(function(msg,stack,source) -- If any error occured print(msg,stack,source.Name) local data = { ['embeds'] = {{ ['title'] = "Error Occured", ['description'] = msg,stack,source.Name.."" -- Error info }} } local finaldata = http:JSONEncode(data) http:PostAsync(url, finaldata) end) end
But i tested to write something random on a script. it did not give any errors To my discord Server. its placed in the workspace on a serverscript.
This was hard to explain so im sorry for the bad explaining.
Please do not use discord bots to report errors in your game.
Read more here: (scroll to comments section): https://devforum.roblox.com/t/discord-integration-a-guide-on-using-discord-through-roblox-updated/47090/2
"WARNING: Do NOT use this if your game has high traffic. It could potentially lead to your Discord account being terminated."
Thanks!