Hello! As you all may know, there is an available plugin for logging basic admin logs. I am curious to know, how would I be able to modify it so that instead of changing the webhook’s name, it will just type the player’s username beside the command.
This is the code from the plugin:
____
/\ _`\ __
\ \ \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
This logs it in a way that the webhook name changes to the player’s username. Instead, I would like it to just send the player’s username beside it. It should look something like this:
xSimplyCool: -command-
I am not very familiar with scripting BAE Plugins.