made woopsie to entities

This commit is contained in:
Mr.Crowley committed 2025-08-05 20:57:26 -05:00
1 parent d0f9fb7ca3
commit 140bad5b34
6 files changed
+130 -49

No files matched your search

+48
View File
@@ -55,5 +55,53 @@ Logs.Send = function(src, message)
end
end
Logs.Notify = function(src, url, image, message)
if not src or not message then return end
local logType = LogSystem or "built-in"
if logType == "built-in" then
local firstName, lastName = Framework.GetPlayerName(src)
PerformHttpRequest(url, function(err, text, headers) end, 'POST', json.encode(
{
username = string.format("%s %s", firstName, lastName),
avatar_url = image or 'https://avatars.githubusercontent.com/u/192999457?s=400&u=da632e8f64c85def390cfd1a73c3b664d6882b38&v=4',
embeds = {
{
color = "15769093",
title = GetInvokingResource(),
-- url = 'https://discord.gg/Gm6rYEXUsn',
thumbnail = { url = LogoForEmbed },
fields = {
{
name = '**Player ID**',
value = src,
inline = true,
},
{
name = '**Player Identifier**',
value = Framework.GetPlayerIdentifier(src),
inline = true,
},
{
name = 'Log Message',
value = "```"..message.."```",
inline = false,
},
},
timestamp = os.date('!%Y-%m-%dT%H:%M:%S'),
footer = {
text = "Community_Bridge | ",
icon_url = 'https://avatars.githubusercontent.com/u/192999457?s=400&u=da632e8f64c85def390cfd1a73c3b664d6882b38&v=4',
},
}
}
}), { ['Content-Type']= 'application/json' })
elseif logType == "qb" then
return TriggerEvent('qb-log:server:CreateLog', GetCurrentResourceName(), GetCurrentResourceName(), 'green', message)
elseif logType == "ox_lib" then
return lib.logger(src, GetCurrentResourceName(), message)
end
end
exports('Logs', Logs)
return Logs