____
/\ _`\ __
\ \ \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
I have tried many ways to adjust this script to make the admin logs show up onto discord, but none of them are working. The only way the admin logs will show up onto a channel is if the command is ran in Roblox Studio. Would anyone know how I could fix this?