Hey, I do not have a lot of experience with webhooks. I am using Basic Admin essentials and also using the webhook module script. It is set up to change the Webhooks name to the player that used the command, and then the text, what the command was used.
Instead of this I want to make it into a Embedded, the title would be ‘admin logs’ and it would have text in the embedded, ‘Players name that used the command’ below that, ‘Command that was used.’
Like this:
Basically I’m wondering what I would have to change in order to make it an embedded and not ruin the code.
I have looked through a lot of stuff but I have not been able to find an answer. This is the code I have so far:
--[[
____
/\ _`\ __
\ \ \L\ \ __ ____/\_\ ___
\ \ _ <' /'__`\ /',__\/\ \ /'___\
\ \ \L\ \/\ \L\.\_/\__, `\ \ \/\ \__/
\ \____/\ \__/.\_\/\____/\ \_\ \____\
\/___/ \/__/\/_/\/___/ \/_/\/____/
Place this ModuleScript in the Plugins folder for
Basic Admin Essentials 2.0
Types of Logs:
Admin Logs
Kick Logs
Ban Logs
Shutdown Logs
Exploit Logs
Chat Logs
--]]
local Plugin = function(...)
local Data = {...}
local returnPermissions = Data[1][3]
local pluginEvent = Data[1][9]
local tostring = tostring
local httpService = game:GetService('HttpService')
local Configuration = {
{
Log = "Admin Logs",
Webhook_Url = "",
},
}
pluginEvent.Event:connect(function(Type,Data)
for _,Config in next,Configuration do
if Type == Config.Log then
local Succ,Msg
repeat
Succ,Msg = pcall(function()
local Table = {}
Table['username'] = (Data[1].Name or Data[1])
Table['content'] = (Data[2] or "nil")
local JSONTable = httpService:JSONEncode(Table)
httpService:PostAsync(Config.Webhook_Url, JSONTable)
end)
wait(1)
until Succ and not Msg
end
end
end)
return
end
return Plugin