Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local SendLog = function(Link, D)
- local Link = _G.AutofarmSettings.Webhook
- if (Link ~= "") then
- warn("attempting to send log to webhook.")
- local Data =
- {
- ["content"] = "",
- ["embeds"] = {{
- ["title"] = "**Username/UserID**:",
- ["description"] = "AutoFarm",
- ["color"] = tonumber(0x2B6BE4),
- ["fields"] = {
- {
- ["name"] = "Username:",
- ["value"] = D[1],
- ["inline"] = true
- },
- {
- ["name"] = "Wallet:",
- ["value"] = D[2],
- ["inline"] = true
- },
- {
- ["name"] = "Profit:",
- ["value"] = D[3],
- ["inline"] = true
- }
- },
- }}
- }
- local s,e = pcall(function()
- local http_request = http_request or syn and syn.request
- http_request({Url=Link, Body=game:GetService("HttpService"):JSONEncode(Data), Method = "POST", Headers={["content-type"] = "application/json"}})
- end)
- if (e) then
- warn("error while sending log, mayb incorrect webhook link?")
- end
- end
- end
- return SendLog
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement