Skip to main content

DiscordLog

ESX.DiscordLog(name, title, color, message)

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)
messagestringNo-Message To Log

Example

ESX.DiscordLog(
"UserActions", -- Name Of Webhook
"User Joined", -- Message Title
"green", -- Colour
"**ID**:```diff\n+ ".. _source .. "```\n**Name**:```diff\n+ ".. player_data.nametag .."```" -- Message
)