πŸ“‹Discord Logs Setup

This guide explains how to set up Discord webhook logging for nolag_properties.

NoLag Properties can send property-related events to Discord channels via webhooks. This guide walks you through enabling Discord logs and configuring webhooks.

Requirements

  • A Discord server where you can create webhooks

  • Permission to create webhooks in the target channel(s)

Step 1: Enable Discord logs in config

In config.lua, set the log method to "discord":

--[[
    Supported log methods:
    * ox_lib
    * discord
    ! You can add your own in custom/logs/
]]
Logs = "discord",

Step 2: Create Discord webhooks

  1. In Discord, open the channel where you want logs (e.g. #property-logs).

  2. Go to Channel settings β†’ Integrations β†’ Webhooks β†’ New Webhook.

  3. Name the webhook (e.g. "NoLag Properties") and copy the Webhook URL.

  4. Repeat for other channels if you want to split logs by category (see below).

Security: Never share webhook URLs or commit them to your repo. Use ConVars in server.cfg so they stay server-side.

Step 3: Configure webhooks in server.cfg

Webhooks are set via ConVars. Add these to your server.cfg before the ensure nolag_properties line (replace the URLs with your real webhook URLs):

  • Order matters: declare these ConVars before ensure nolag_properties in server.cfg, or the resource will not see them.

  • You must set at least propertiesDiscordWebhook (or every specific webhook). If a specific one is missing, the general webhook is used.

  • If you want all logs in one channel, set only propertiesDiscordWebhook.

Webhook types and events

Webhook type
ConVar
Events

property

propertiesPropertyWebhook

Property created, deleted, set for sale

building

propertiesBuildingWebhook

Building created, deleted

keyholder

propertiesKeyholderWebhook

Key holder added/removed, all key holders removed, lock re-keyed, physical key issued

door

propertiesDoorWebhook

Door added, door removed

raid

propertiesRaidWebhook

Property raided (lockpick success)

transaction

propertiesTransactionWebhook

Property bought, rented, rent extended, rent cancelled, property sold

Example: one channel for everything

All events will go to the channel that owns this webhook.

Example: separate channels for transactions and raids

  • Transactions (buy, rent, sell, etc.) β†’ transaction webhook channel.

  • Raids β†’ raid webhook channel.

  • Everything else (property/building/keyholder/door) β†’ general webhook channel.

What gets logged

The Discord log module sends embeds for:

  • Property – Create, delete, set for sale

  • Building – Create, delete

  • Transactions – Buy, rent, extend rent, cancel rent, sell

  • Keyholders – Add, remove, remove all

  • Doors – Add, remove

  • Raid – Property raided

  • Locks – Re-key lock, issue physical key

Each embed includes relevant IDs, player identifiers, labels, and prices where applicable.

Troubleshooting

  • No logs in Discord

    • Ensure Logs = "discord" in config.lua.

    • Restart the resource after changing config or ConVars.

    • Check that the webhook URL in server.cfg is correct and the webhook wasn’t deleted in Discord.

  • Wrong channel Each webhook is tied to the channel where it was created. Use the correct webhook URL for the channel you want.

  • "SET_YOUR_WEBHOOK_IN_SERVER.CFG" in logs The default placeholder is being used because no ConVar was set. Add setr propertiesDiscordWebhook "..." (and any specific webhooks) to server.cfg.

Customizing the Discord log content

The Discord log logic lives in custom/logs/discord.lua. You can edit that file to change embed titles, colors, fields, or add new ones. Restart the resource after editing.

Last updated