# Creating a webhook for logging

## Step 1

Create a webhook on your discord channel&#x20;

{% hint style="info" %}
[How to create a webhook?](https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks)
{% endhint %}

## Step 2

Go into server/webhook.lua in script koja-lib and set the url of your webhook in the **table** KOJA.Server.Webhooks as \['cardealer'] string

{% code title="webhook.lua" %}

```lua
KOJA.Server.Webhooks = {
    ['cardealer'] = '' -- URL of the webhook
}
```

{% endcode %}

## And you are all set!

***

If the webhook embed doesn't meet your preferences, feel free to edit it!


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.kojascripts.eu/new/cardealer/configuration/creating-a-webhook-for-logging.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
