Skip to main content

DiscordLog With Fields

ESX.DiscordLogFields(name, title, color, fields)

This function logs to a Discord Webhook.

Argument

ArgumentData TypeOptionalDefault ValueExplanation
namestringYesDefaultWebhook Name (found in Config.logs.lua)
titlestringNo-Webhook Title
colorstringYesDefaultWebhook Colour (found in Config.logs.lua)
fieldstableNo-Fields To Log

Example

ESX.DiscordLogFields("UserActions", "/car Triggered", "pink", {
{name = "Player", value = xPlayer.name, inline = true},
{name = "ID", value = xPlayer.source, inline = true},
{name = "Vehicle", value = args.car, inline = true}
})