Hi everyone! I’m trying to make a pmlogs command on Basic Admin Essentials 2.0. What I want is that when a person says :pmlogs as the command in Basic Admin, a panel shows up and shows all the replies and messages that were done in pms. a example would be like “[user] privately messaged [user] with content:”
I have no idea on how I could achieve this so I’d need your help.
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 = "PMLogs",
Webhook_Url = "INSERT WEBHOOK HERE",
},
}
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