Logs

The resource has logs out of the box, that means that only touching a few lines of config you can have your logs working integrated into Discord via webhook.

Logs config

To enable the logs you should modify the config inside configs/sv_config.lua.

SV_CONFIG.Logs = {
    enabled = true,
    webhook = '',
    actions = {
        alert = 'The user sent the following alert: **__%s__**',
        unit_changed = 'The user changed their unit to **__%s__**',
        unit_user_changed = 'The user changed the unit of id **__%s__** to **__%s__**',
        subscribe_alert = 'The user subscribed to the following alert: **__%s__**',
        unsubscribe_alert = 'The user unsubscribed from the following alert: **__%s__**',
        add_paint = 'The user added a paint',
        remove_paint = 'The user removed a paint',
    }
}

Here you can modify the text of each log, include your config url and toggle the logs option.

The webhook url should look like something like this: https://discord.com/api/webhooks/1112423049921298522/QKbI6kF6GKfxeOHnc1NUoR64RaQ2t8RuYUHUvyQb3YE2F0qgPjsH46SK5Kv3RTwDepp

Last updated