Hello everyone, i have been working on this module around 1 - 2 months. I’ve made several unsuccessful modules but this is the one that got me this far.
LogModule Will help you keep track of stuff happening in game, you can customize it as you wanted.
How to use:
How to use
Before you start you need to turn on Allow HTTP Requests (You need to publish your game/experience first before getting the options.)
Next get the file rbxm then put the folder to ServerScriptService;
LogScript will be the example code that you can use
LogModule is the module, Open it for more infos;
Put your discord Webhooks in the ‘Webhooks’ ModuleScript
You can edit anything in ‘Settings’ two important one is ‘Admins’ and ‘SendLogsCommand’
So when an admin says the ‘SendLogsCommand’ word, it will sends the game latest logs
You can try making a custom reporting by using this module.
Example Code:
Code
local plrs = game:GetService("Players")
local LogModule = require(script.Parent.LogModule)
local landmine = script.Landmine.Value
landmine.Touched:Connect(function(hit)
local char = hit.Parent
if char and char:FindFirstChild("Humanoid") then
-- adds a log when Landmine triggered
LogModule.AddLog(char.Name .. " Triggered the landmine")
local ex = Instance.new("Explosion")
ex.Position = landmine.Position
ex.Parent = workspace
landmine:Destroy()
end
end)
plrs.PlayerAdded:Connect(function(plr)
-- Adds a log when player joins
LogModule.AddLog(plr.Name .. " has joined the game")
plr.Chatted:Connect(function(msg)
-- Adds a log when player chatted
LogModule.AddLog("[".. plr.Name .."]: " .. msg)
end)
-- Checks if player an admin or not, if player an admin then the player can send logs
LogModule.CheckAdmin(plr)
end)
Idea:
You can add custom Logs, lets say you have a game about Sword Fighting, you can use this module to keep track of the latest kills and if someone is being suspected as a cheater. Example;
that means i’m still okay to use my module, right?.. my module is not sending server logs every second, its only sending logs when an admin typed the SendLogsCommand to the chat.
Yeah, I agree that default rate-limiting should probably be part of this resource. If you do not respect the rate-limits, Discord may block you, or worse, Roblox may block you from using HttpService in order to keep good relations with Discord.
This module only sends whenever someone fires the .SendLogs function on the module. While it sending Logs you cannot call the the sendlogs function until the first one is done.
Example:
local LogModule = require()
LogModule.SendLogs()
-- Sends the Logs.
LogModule.SendLogs()
-- Will get a warning from the module because the first one is still running.
The sending system can be called by multiple Webhooks making it harder to get past the rate-limits.
I do not understand to why are you guys saying i need to keep the rate-limit even tho the code shows that it’s super rate-limited (like… really).
If theres any concerns in the code that may fall into the rate-limited category that i didn’t find, you can message me in devforum or discord (fayking#8312).
I’m using a proxy; hooks.hyra.io the proxy will block me if i go past the proxy rate-limit, not discord.
I’ve never seen someone got blocked by simply using HttpService, can you provide more proof/evidence?..
By the way, discord blocked roblox from sending webhooks, that’s why i’m using a proxy.