Discord functions
SendDiscordLog
SendDiscordLog(type, title, description, player_id, admin_id)
Parameters:
type:
string
- Webhook URL name from webhook_urls.luatitle:
string
description:
string
player_id:
number
admin_id:
number
Example:
SendDiscordLog('kick', 'Player kicked', ('Reason: %s'):format(reason), target_id, admin_id)

GetDiscordAvatarFromId
Returns discord avatar URL from cache.
GetDiscordAvatarFromId(targetId)
Parameters:
targetId:
number
Returns: string
GetIdentifiersEmbedField
Used for default discord logging, it returns embed field object with identifiers, It mentions player on discord.
GetIdentifiersEmbedField(identifiers, field_name, inline)
Parameters:
identifiers:
string[]
field_name:
string
inline:
boolean
Returns:
name:
string
value:
string
inline:
boolean

SendPlainDiscordWebhook
SendPlainDiscordWebhook(type, data)
Parameters:
type:
string
- Webhook URL name from webhook_urls.luadata - Discord webhook params. https://discord.com/developers/docs/resources/webhook#execute-webhook-jsonform-params
Last updated