I was wondering if this is possible to log possible admin abuse, if someone knows how to please inform me thank you!
Yes, you can. But if you want you can also log the admin’s user id or whatever you want the same way HD Admin logs bans.
Is there a module for that? or something
Just post a webhook whenever an admin posts in chat, check if its related to a command then send a webhook
I suggest logging the amount of times each command was used whilst they were in game, then post the amounts with each command after they have left so theres no spam
Soo did you get what you wanted or something?
Sorry for the quite late response, no I still did not find my way around the HD Admin module.
In the new(er) version(s) of HD Admin, it seems that @ForeverHD removed the webhook functions. Makes sense, Discord blocked all webhooks that sourced from ROBLOX, and then blocked any proxies that were associated with ROBLOX, and this was before Guilded took off and had reliable webhook posting capabilities, but it would be nice to have them back.
I have a copy of an older version of HD Admin, iirc sometime around the 2020/2021 time frame. If you want, I can send you a copy of it…
HOWEVER
if your game uses the new ROBLOX chat system instead of the old/legacy version, old(er) versions of HD Admin will not work. The version I have of HD Admin that still has webhooks only works with the old/legacy chat system. You will need to use the new HD Admin version(s), since they are capable with the new ROBLOX chat system.
I have a script that serves as a work-around to still give you webhook postings with the new HD Admin versions:
---- local script, which is inside StarterPlayerScripts
local TextChatService = game:GetService("TextChatService")
local Players = game:GetService("Players")
local rs = game:GetService("ReplicatedStorage")
local function checkIfCommand(message: string, plr:Player)
if string.sub(message,1,1) == ";" then --- change ; to whatever the prefix you use is, if necessary
print("using admin commands!")
print(message)
rs.logCommand:FireServer(message)
end
end
TextChatService.OnIncomingMessage = function(message: TextChatMessage)
local props = Instance.new("TextChatMessageProperties")
if message.TextSource then
local player = Players:GetPlayerByUserId(message.TextSource.UserId)
if player:GetRankInGroup(groupIdHere) >= rankNumberHere then
checkIfCommand(message.Text,player)
end
end
return props
end
--- server script
local lastLogs = {} --- for some reason, command detection fires twice. i added a small server-sided debounce to counter this.
game.ReplicatedStorage.logCommand.OnServerEvent:Connect(function(player: Player, msg:string)
local rank = player:GetRankInGroup(groupIdHere)
if rank >= rankNumberHere and lastLogs[tostring(player)] ~= true then
lastLogs[tostring(player)] = true
task.delay(1.5,function() lastLogs[tostring(player)] = nil end)
local link = "your webhook link here"
local post ={
["embeds"] = {{
["title"] = "** Admin Command Usage Detected**",
["description"] = "This log was detected in-game.",
["type"] = "rich",
["color"] = tonumber(0xFF8C00),
["fields"] = {
{
["name"] = "username",
["value"] = tostring(player),
["inline"] = true
},
{
["name"] = "command(s) used",
["value"] = msg,
["inline"] = true
},
{
["name"] = "numerical rank in group",
["value"] = tostring(rank),
["inline"] = true
},
{
["name"] = "date",
["value"] = tostring(os.date("%A, %B %d %Y",os.time())),
["inline"] = true
},
{
["name"] = "server id",
["value"] = tostring(game.JobId),
["inline"] = true
},
},
}}
}
local PostData = HTTPService:JSONEncode(post)
HTTPService:PostAsync(link, PostData);
end
end)
Make sure HTTP service is turned on in your game. The above code should yield a result like this in whatever destination you want (in my case, a Guilded server channel):