# Discord Bot Token

#### 1. Access the Discord Developer Portal

Start by visiting the [Discord Developer Portal](https://discord.dev/developers/applications/). This portal is where you manage all your applications and bots.

* If you already have a bot, simply select it from the list.
* If not, click the “New Application” button to create one.

<figure><img src="https://1879705341-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmWNMt0AI0Q7rcNkVhKNa%2Fuploads%2FrSwj9u5Mq1bIWLY4kwLU%2Fimage.png?alt=media&#x26;token=850a1cde-be2a-4a57-b506-a31d2cde8dbf" alt=""><figcaption></figcaption></figure>

#### 2. Name Your Bot

Next, you’ll need to name your bot.

<figure><img src="https://1879705341-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmWNMt0AI0Q7rcNkVhKNa%2Fuploads%2FvO2RBLwE8DW0BgdE4wT3%2Fimage.png?alt=media&#x26;token=29a759ef-6ded-410b-ae0f-3ad6ca491342" alt=""><figcaption></figcaption></figure>

#### 3. Configure Bot Settings

After naming your bot, navigate to the **Bot** tab.

* Click on **Add Bot** if your bot isn't already created.
* Once the bot is created, enable all necessary intents by toggling the options in the **Privileged Gateway Intents** section.

<figure><img src="https://1879705341-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmWNMt0AI0Q7rcNkVhKNa%2Fuploads%2Fn4zYBTWqJ1VhmAtsSkDg%2Fimage.png?alt=media&#x26;token=baa018e4-42ad-4072-af9b-fd4bf9b42542" alt=""><figcaption></figcaption></figure>

#### 4. Invite the Bot to Your Discord Server

To invite the bot to your Discord server:

1. Go to the **OAuth2** tab.
2. Under **OAuth2 URL Generator**, select the following scopes:
   * `bot`
   * `applications.commands`
3. Scroll down to **OAuth2 URL Generator** and copy the generated URL.
4. Paste this URL into your browser, select your server, and authorize the bot.

<figure><img src="https://1879705341-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmWNMt0AI0Q7rcNkVhKNa%2Fuploads%2FWxeiS9Cm5X9SfoWeLqY8%2Fimage.png?alt=media&#x26;token=75a37cdc-2082-4b20-ab48-a31d28264980" alt=""><figcaption></figcaption></figure>

#### 5. Retrieve and Configure Your Bot Token

Finally, you’ll need to obtain your bot's token:

1. Navigate to the **Bot** tab.
2. Click **Reset Token** to generate a new token.
3. Copy the token and paste it into your `config.json` file where it says `"token"`.

<figure><img src="https://1879705341-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmWNMt0AI0Q7rcNkVhKNa%2Fuploads%2FFSYa0NLX6YOIJEGiR6Yp%2Fimage.png?alt=media&#x26;token=5fb06e12-0f33-4b4c-b376-ad8ff9353c13" alt=""><figcaption></figcaption></figure>

<figure><img src="https://i.imgur.com/Lms5Iud.png" alt=""><figcaption></figcaption></figure>

&#x20;                                                   You have successfully completed the bot setup.
