# Discord Log

## Step 1: Configure the Discord Log System

**Locate the `server/discord_log.lua` File**

* Navigate to the `server` folder within your script files.
* Find and open the `discord_log.lua` file.

## Step 2: Enable Logging and Set Webhook

Inside the `discord_log.lua` file, you'll find a section that manages the log settings. To enable the log system and set your Discord webhook, follow these steps:

* Locate the following block of code in the file:

```lua
discordLog = {
    enabled = false,
    webhook = 'https://discord.com/api/webhooks/1273230382594003019/FqPU9b0FqkROTKOgKoLThb5ApA-vV14JbuFwOPAUsDJrJqYHTwwFAHUlnvz8IwJZh7UE',
}
```

* To activate the log system, set the `enabled` field to `true`:

```lua
enabled = true
```

* Replace the existing webhook URL with your own Discord webhook. This is where the logs will be sent. You can create a new webhook in the settings of your Discord server:

```lua
webhook = 'https://discord.com/api/webhooks/YOUR_WEBHOOK_URL'
```

#### Example of Updated Configuration:

After making these changes, your code should look like this:

```lua
discordLog = {
    enabled = true,  -- Enable the logging system
    webhook = 'https://discord.com/api/webhooks/YOUR_WEBHOOK_URL',  -- Replace with your Discord webhook
}
```

## Step 3: Save and Restart Your Server

* After updating the webhook and enabling the log system, save the changes to the `discord_log.lua` file.
* Restart your FiveM server to apply the new log settings.

***

By following these steps, you will successfully enable the Discord log system and ensure that all logs are sent to your specified Discord channel via the provided webhook.
