HD Admin Webhook Logger

Hey I was wondering if it is possible to log any HD admin commands to a webhook. I want all commands to be logged if the user’s rank is 1 and above! Thanks!

You can log anything to Discord webhooks by using HTTPService. Discord blocked HTTP accesses from Roblox so you will have to use a proxy, I use this one: https://webhook.lewisakura.moe/

Don’t worry though, it is not against TOS to send anything from Roblox to Discord. I believe the access was blocked because many people used webhooks to log any script errors or chat messages and that slowed down Discord.

In this case, we are going to try to send an embed.

local HTTPService = game:GetService("HTTPService")

local URL = "" -- Your converted-to-proxy Discord webhook URL
local Data = {
		["embeds"] = { -- Weird formatting is required for some reason..
				["title"] = "This is the title of the embed",
				["description"] = "This is the description of the embed",
				["color"] = 16740608 -- Converted to decimal colour (https://www.mathsisfun.com/hexadecimal-decimal-colors.html)
	local JSON = HTTPService:JSONEncode(Data) -- We convert our table to JSON
	HTTPService:PostAsync(URL, JSON, Enum.HttpContentType.ApplicationJson) -- Send the webhook to the webhook

Whoa, look at that! It works perfectly! Great job!

Image from an earlier webhook I once sent to Discord btw.

1 Like

Hey there! Thanks for letting me know but would you know any ideas to fetch when a command is sent from HD admin and put it in a little embed?

1 Like

You can use the .Chatted event and check if the message matches the command and the player who sent the message is whitelisted by checking their ID.

Actually, Discord does not mind people using the webhook feature, Discord blocked direct access from Roblox just because people logged stuff with it. Bots require coding in JavaScript or Python, which is more difficult to do than Luau. I think he should use webhooks, just set a cooldown or something so embeds won’t be sent so frequently. Maybe make a table, store all the information including date and time when the command was executed and then send it through a webhook once the table has a certain amount of values or tables in it?

As @BandQueenForever said discord only blocked it because people used to do things like log cookies and used to spam the API. But if I use a proxy and set a cooldown and the proxy’s are allowed as long as they dont spam discord’s end. Thanks :slight_smile:

Would there be some sort of thing like a plugin as for BAE? Like I place a script in the mainmoudle (i have it btw) and it should detect when a command is ran? Or HD doesn’t support it like BAW (Basic Admin)

I’m not sure about that. Just find the script that detects all the commands in the HD Admin folder and connect the chatted event to the function that sends the webhook.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.