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?

1 comment
Free model code