> For the complete documentation index, see [llms.txt](https://docs.discordbotfactory.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.discordbotfactory.com/getting-started/quickstart.md).

# Create and setup a bot

Here you'll learn how to set up and create a brand new bot with some starter actions.

{% hint style="warning" %}
Prerequisites&#x20;

If this is your first time opening the app, you may be prompted to install Node.js.

Node.js is required to create and run bots. If you'd prefer to install it manually, download it from the official site [here](https://nodejs.org/en/download).
{% endhint %}

### Get started

Follow these steps to create a new bot project and connect it to the Discord Developer Portal.

{% stepper %}
{% step %}

### Create a New Project

Click **New Project** on the Home page or the Projects page to open the New Project modal.

You can also use `CTRL+N` on Windows or `CMD+N` on macOS.

<figure><img src="https://2205442932-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fp603l6izRqmZfqN60GqQ%2Fuploads%2F1wryoBmrEBjcHdkrUt2E%2Fimage.png?alt=media&amp;token=8cfc6f72-2cf4-4234-af9e-f463d5f66cac" alt=""><figcaption></figcaption></figure>

Choose a **Project Name**. This becomes the name of the folder created for your bot.

You can randomise the name with the dice button in the top-right corner.

<div data-with-frame="true"><figure><img src="https://2205442932-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fp603l6izRqmZfqN60GqQ%2Fuploads%2FeccaICajOV9ZJ1KVrbSp%2Fimage.png?alt=media&amp;token=8c6bce40-87db-42be-925f-aa1025b87940" alt=""><figcaption></figcaption></figure></div>

Next, choose a **File Location**. The app creates your bot folder in this directory.

It will not overwrite existing files or folders. Avoid using the same name as an existing folder in that directory.

{% hint style="info" %}
You can set a default folder location for your bots in Preferences.
{% endhint %}

<div data-with-frame="true"><figure><img src="https://2205442932-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fp603l6izRqmZfqN60GqQ%2Fuploads%2FAyZn4gN4fr25LZKCotCo%2Fimage.png?alt=media&amp;token=35c116b0-e280-46ab-aa4d-ee8185311e5a" alt=""><figcaption></figcaption></figure></div>

Finally, select a template. The Starter Bot template includes a simple starter command.

When you're ready, click **Create Bot**.

<div data-with-frame="true"><figure><img src="https://2205442932-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fp603l6izRqmZfqN60GqQ%2Fuploads%2FtESNfWySp6ryyAJ3VHXR%2Fimage.png?alt=media&amp;token=52236123-c51a-4f5f-af66-37b23e4552ea" alt=""><figcaption></figcaption></figure></div>

Creating your bot can take anywhere from **1 second to around 30 seconds**. Wait while the files are generated.
{% endstep %}

{% step %}

### Setting up your bot

After your bot is created, open the Projects tab in the left sidebar.

<figure><img src="https://2205442932-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fp603l6izRqmZfqN60GqQ%2Fuploads%2FsHfqd8jDVtTbRSfJsURY%2Fimage.png?alt=media&amp;token=1b63c8c9-f59a-4413-b7cf-1d71ec66b64c" alt=""><figcaption></figcaption></figure>

Click the Settings icon in the Current Project section to open the Bot Settings modal.

You can also use <kbd>CTRL+,</kbd> on Windows or <kbd>CMD+,</kbd> on macOS.

<div data-with-frame="true"><figure><img src="https://2205442932-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fp603l6izRqmZfqN60GqQ%2Fuploads%2Fz0Wb4gVv6tRcYxyJKVnG%2Fimage.png?alt=media&amp;token=dc99dc7f-c020-4a68-b8af-5753f14f0107" alt=""><figcaption></figcaption></figure></div>

Here, you can edit project settings like the project name. This does not rename the project folder.

To finish setup, you need a bot token from the [Discord Developer Portal](https://discord.com/developers/applications).

If you already have one, paste it into the **Bot Token** field.

{% hint style="warning" %}
You should treat your token like a password. Anyone with the token could get access to your bot.
{% endhint %}

<div data-with-frame="true"><figure><img src="https://2205442932-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fp603l6izRqmZfqN60GqQ%2Fuploads%2FEYkmhnM4acLMaM28OKT6%2Fimage.png?alt=media&amp;token=134d6484-3218-428c-bab5-38158af17936" alt=""><figcaption></figcaption></figure></div>

If you don't have a bot token yet, check out the guide below.

<details>

<summary>Getting a Bot Token</summary>

1. To start, open the [Discord Developer Portal](https://discord.com/developers/applications) (You may need to sign in).
2. Click "<mark style="color:blue;">New Application</mark>" in the top right corner.
3. Give it a name (this is your bot's name), agree to the terms and click Create. Here you can edit your bot's Discord profile.
4. Click on the Bot tab in the left sidebar and scroll down to "<mark style="color:blue;">Privileged Gateway Intents</mark>".
5. Enable the three toggle: <mark style="color:blue;">Presence Intent</mark>, <mark style="color:blue;">Server Members Intent</mark>, <mark style="color:blue;">Message Content Intent</mark>, and click Save.
6. At the top of the bot tab, click "<mark style="color:blue;">Reset Token</mark>" (Discord may ask to verify you).
7. Click "<mark style="color:blue;">Copy Token</mark>" and head back to the app, then paste it into the Bot Token field.

</details>

If everything is set up correctly, you will see your bot preview at the top.

Click **Generate Invite Link** to invite your bot to your server.

{% hint style="info" %}
You can set your default invite permissions in Preferences.
{% endhint %}

<div data-with-frame="true"><figure><img src="https://2205442932-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fp603l6izRqmZfqN60GqQ%2Fuploads%2F7ZgXUBxKAnRgAcRztPeG%2Fimage.png?alt=media&amp;token=db268bde-1479-4709-b76e-f56dae6e6d0e" alt=""><figcaption></figcaption></figure></div>
{% endstep %}
{% endstepper %}

### Now you're ready!

You can now add events and triggers and run your bot, or follow our guide to learn the flow system.
