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

Why won't my join log/chat log script work in the real game? [closed]

Asked by 5 years ago

basicly when you join it puts whjo joins and what they said in the discord channels. It works in studio and studio testing with the server but not the actualy real game for some reason.

Discord API

--[[
    Discord - Roblox hookup
    ConfidentCoding
    Do not touch this script.
--]]

local webHook = {}
webHook.__index = webHook

function webHook.new(id,key) 
    local mt = setmetatable({id=id,key=key}, webHook) 
    return mt
end

function webHook:post(config,host)
    local data = nil
    local success = pcall(function()
        data = game:GetService("HttpService"):JSONEncode(config)
    end)
    if not success then warn("Webhook can't be converted to JSON") return end
    game:GetService("HttpService"):PostAsync("https://discordapp.com/api/webhooks/"..self.id.."/"..self.key,data)
end

return webHook

JoinLogger

--[[
    ConfidentCoding
    in order for this to work please watch the following short tutorial:
    https://youtu.be/KxkWNJ6ZLMw
--]]
local APIModule  = require(script.Parent)



local newWebHook = APIModule.new("--Cannot Expose--","--Cannot Expose--")

game.Players.PlayerAdded:Connect(function(Player)
newWebHook:post{
            username = "Player",
            content = "**" .. Player.Name .. "** has joined the server"
        }
end)

Chat Logger

--[[
    ConfidentCoding
    in order for this to work please watch the following short tutorial:
    https://youtu.be/KxkWNJ6ZLMw
--]]
local APIModule  = require(script.Parent)

local newWebHook = APIModule.new("--Cannot Expose--","--Cannot Expose--")

game.Players.PlayerAdded:Connect(function(Player)
    Player.Chatted:Connect(function(msg)
        newWebHook:post{
            username = Player.Name,
            content = msg
        }
    end)    
end)

Is there any fix?

0
Free model code User#19524 175 — 5y

Closed as Not Constructive by User#19524

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

1 answer

Log in to vote
0
Answered by
Astralyst 389 Moderation Voter
5 years ago

Requests from discordapp.com is blocked, to fix:

Simply replace https://discordapp.com in your webhook url to https://discord.osyr.is

^ this is a proxy server made by Osyris solely for the purpose of discord proxy.

Also, your webhook requests WILL also get blocked if you abuse and go over the API limits.

What I mean by that; I don't recommend using a chat logger or a join log. These requests will most likely get blocked due to it being requested almost every single second.

You can simply unblock your requests by creating a new webhook; but you'll end up having to keep changing it over and over and over again. Might aswell not bother at all.

for more stuff, view here: https://devforum.roblox.com/t/roblox-discord-webhook-proxy-server/98825

Ad