Discord functions
SendDiscordLog
SendDiscordLog(type, title, description, player_id, admin_id)Parameters:
type:
string- Webhook URL name from webhook_urls.luatitle:
stringdescription:
stringplayer_id:
numberadmin_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:
stringinline:
boolean
Returns:
name:
stringvalue:
stringinline:
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