Discord sender
Send discord message via webhook
Sending notification as rcore
rcore = exports.rcore
rcore:sendDiscordMessage(title, message, color, footer)Sending custom notification
rcore = exports.rcore
rcore:sendCustomDiscordMessage(webhook, title, message, color, footer)Example of sending join notification
rcore = exports.rcore
AddEventHandler('esx:playerLoaded', function(source)
local xPlayer = ESX.GetPlayerFromId(source)
if xPlayer then
local webhook = ''
local title = 'Player joined!'
local message = string.format('Player %s has joined!', xPlayer.getName())
local rcoreConfig = rcore:getConfig()
local footer = 'cool script'
rcore:sendCustomDiscordMessage(webhook, title, message, rcoreConfig.DiscordColors.Green, footer)
end
end)Colors
Last updated