Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why does the webhook not send any Error info when error occured?

Asked by 4 years ago
Edited 4 years ago

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.

0
Try keeping that ServerScript in ServerScriptService BestCreativeBoy 1395 — 4y
0
@BestCreativeBoy Im sorry but that did not work. is it anything in the script? HKprogram 48 — 4y
0
@BestCreativeBoy Im sorry but that did not work. is it anything in the script? HKprogram 48 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago

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!

0
Hey! Thanks for the information. I am using the error stuff to fix error for further Bug fixes If you understand what i mean. I have not Get any traffic on the game, its not even popular yet. Ill check the post at the link you showed :) HKprogram 48 — 4y
0
If it's not popular, then why do you need it? Can't you just use output, or developer console? It's good as it is, I don't see any reason to use Discord for that. Discord is not a place for developers to report their bugs or glitches. There are other tools for that.  KoxiThePlayerPL 37 — 4y
Ad

Answer this question