# First Time Setup

### Step 1: Setting Up Your Bot

#### 1.1 Obtain Your Bot Token

1. Visit the [Discord Developer Portal](https://discord.com/developers/applications).
2. Click **"New Application"** and give it a name.
3. Go to the **"Installation"** tab:
   * Uncheck **User Install**
   * Set **Install Link** to `"None"`

<figure><img src="https://793846788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FH32pcDz3SxP8UThFTci3%2Fuploads%2FWYV7Wy9ch6YYBkmBqVdM%2F%7B508D5FA0-C009-41BB-BE1F-7A5B5810FD65%7D.png?alt=media&#x26;token=9c1880ad-ae5f-488a-ab12-a8e9ddc728e8" alt=""><figcaption></figcaption></figure>

1. Navigate to the **"Bot"** tab:
   * Click **"Add Bot"**
   * Under **Privileged Gateway Intents**, enable:
     * `PRESENCE INTENT`
     * `SERVER MEMBERS INTENT`
     * `MESSAGE CONTENT INTENT`
   * Under **Public Bot** settings:
     * Disable **Public Bot**
     * Untick **Require OAuth2 Code Grant**

<figure><img src="https://793846788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FH32pcDz3SxP8UThFTci3%2Fuploads%2Fxs5tgC3GPqmoq7OZL9JO%2F%7BB228AEFE-BD1B-415D-A001-A7675A7C6053%7D.png?alt=media&#x26;token=ab0e1aac-876f-4dec-af51-e21bdaf2c9bd" alt=""><figcaption></figcaption></figure>

* Click **Save Changes**
* Copy your **Bot Token** from the Token section

{% hint style="success" %}
**Note:** All of these options are found under the **Bot** tab.
{% endhint %}

***

#### 1.2 Get Your License Key

Join our [Discord Server](https://discord.gg/drakobot) and navigate to the [`✅┃verify-purchase`](https://discord.com/channels/1192943606961557556/1322254110434525195) channel to verify your purchase and receive your license key.

***

### Step 2: Configuring Your Bot

Update your bot’s configuration file `core.yml`, with the following parameters:

```yaml
Version: "1.8.6"
BotToken: "YOUR_BOT_TOKEN"
LicenseKey: "YOUR_LICENSE_KEY"
mongoURI: "YOUR_MONGO_URI"
BotName: "Drako Bot"
LogCommands: true
Statistics: true
Timezone: "America/New_York"
```

***

### Step 3: Setting Up MongoDB

Drako Bot uses MongoDB for data storage.

Follow the steps in the [**MongoDB Setup Guide**](https://docs.drakodevelopment.net/getting-started/mongodb-setup) to:

* Create a MongoDB Atlas account
* Set up a new cluster and database
* Obtain your connection string (`MongoURI`)
* Follow the guide [here](https://docs.drakodevelopment.net/misc/mongodb-setup)

{% hint style="danger" %} <mark style="color:red;">**Important:**</mark> Do not skip this step! It is required.
{% endhint %}

***

### Step 4: Installing Node.js

Download and install **Node.js v21.7.3**:

[Download Node.js v21.7.3](https://nodejs.org/dist/v21.7.3/node-v21.7.3-x64.msi)

Follow the installation prompts to complete the setup.

{% hint style="success" %} <mark style="color:green;">**Note:**</mark> You can use our [Pterodactyl Guide](https://docs.drakodevelopment.net/getting-started/pterodactyl-setup-guide) if you aren't hosting it locally
{% endhint %}

***

### Step 5: Inviting Your Bot

1. In the Discord Developer Portal, go to **OAuth2 > URL Generator**
2. Under **Scopes**, select:
   * `bot`
   * `applications.commands`
3. Under **Bot Permissions**, select:
   * `Administrator`
4. Copy the generated URL and open it in your browser
5. Select your server and authorize the bot

***

### Step 6: Running Your Bot

#### 6.1 Navigate to the Bot Directory

Open Command Prompt or Terminal and navigate to the folder where your bot files are located:

```bash
cd path/to/your/bot
```

{% hint style="success" %}
Video Tutorial: <https://www.youtube.com/watch?v=neQUxiLPglg>
{% endhint %}

#### 6.2 Install Dependencies

Install required dependencies using npm:

```markup
npm install
```

#### 6.3 Start the Bot

Start your bot with:

```markup
npm start
```

If `npm` isn't recognized, restart your terminal and try again.

{% hint style="success" %}
**Note:** If `npm` isn't recognized, restart your terminal and try again.
{% endhint %}

***

### Support and Troubleshooting

If you run into any issues during setup, join our Support Server and open a ticket. We're happy to help.


---

# 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.drakodevelopment.net/getting-started/first-time-setup.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.
