# Configuration file

Inside of the `src` folder, you should find a `config.example.json` file. It should look something like this:

```json
{
    "token": "DISCORD BOT TOKEN",
    "clientId": "DISCORD BOT CLIENTID",
    "carterkey": "CARTER KEY",
    "channelmode": "ON or OFF",
    "channelid": "ID of Channel if channelmode is set to ON"
}
```

## Token

You can find your discord bot token by heading over to the [Discord Developer Portal](https://discord.com/developers/applications), opening up your application, and going to the bot page.

<div align="left"><figure><img src="https://1680910742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1Z31z8hM43oC8Y3Hwp9o%2Fuploads%2Fsrl4UcE9U0VATXoNcgUz%2Fimage.png?alt=media&#x26;token=c183e36d-ae15-4b6f-8959-7c0a1b63d434" alt=""><figcaption></figcaption></figure></div>

## ClientId

You can find your discord bots' Client Id by heading over to the [Discord Developer Portal](https://discord.com/developers/applications), opening up your application, and going to the OAuth2 page.

## CarterKey

First, you need to create a new Carter Character. The Carter Team have created a [perfect walkthrough](https://docs.carterlabs.ai/tutorials/princess-ellie-full-walkthrough) on how to do this. Once created, you can then create your Carter API Key at the bottom of the character page

<div align="left"><figure><img src="https://1680910742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1Z31z8hM43oC8Y3Hwp9o%2Fuploads%2FjKHkQR6974PduvNX0E56%2Fimage.png?alt=media&#x26;token=08b76eed-8a4d-4bde-86e3-b6019083bc33" alt=""><figcaption></figcaption></figure></div>

## ChannelMode

You can either set this value to <mark style="color:yellow;background-color:orange;">`ON`</mark> or <mark style="color:yellow;background-color:orange;">`OFF`</mark>. This allows for messaging the bot through a Discord Channel in a server.

## ChannelId

If the ChannelMode property is set to <mark style="color:yellow;background-color:orange;">`ON`</mark>, you need to specify the channel id that the bot should respond to messages in. You can find this by enabling developer mode in the Discord settings, under Advanced. This allows you to right click on any channel, and copy its ID.

[Back to the top ⮥](https://mountaint144.gitbook.io/carterbot/installation/configuration-file)
