# Creating Discord Bot

This tutorial explains how to create and add your bot to FlexyBot.&#x20;

{% embed url="<https://www.youtube.com/embed/1tyGlEgNgTk?si=eIO4SVL28g_RPkLT>" %}
Video tutorial
{% endembed %}

Start by going to [Discord Developer Portal](https://discord.com/developers/applications) and selecting **Applications**. Click on **New Application**.

<figure><img src="https://3295602690-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMRfG9QvNConKIyipM24L%2Fuploads%2FuQOGawrbuBDoUb2bFwHt%2F1.jpg?alt=media&#x26;token=7e91f1f1-e942-4865-979c-ffdf869624cc" alt=""><figcaption></figcaption></figure>

Enter a name for your bot.

<figure><img src="https://3295602690-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMRfG9QvNConKIyipM24L%2Fuploads%2FRjQ2Kpsk34A58AmKzHt1%2F2.jpg?alt=media&#x26;token=3cff8398-d674-498a-8f7c-9c68f8e6c0a3" alt=""><figcaption></figcaption></figure>

Select **Bot** on the left side menu.

<figure><img src="https://3295602690-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMRfG9QvNConKIyipM24L%2Fuploads%2FmtIqXntBzfgBwSLDk6TI%2F3.jpg?alt=media&#x26;token=7d337bc6-9e33-4478-b0be-e18312353723" alt=""><figcaption></figcaption></figure>

Scroll down, **enable** **all three** privileged gateway intents and select **Save changes**.

<figure><img src="https://3295602690-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMRfG9QvNConKIyipM24L%2Fuploads%2FeFvfdLJcegfCxZxjVZLl%2F4.jpg?alt=media&#x26;token=e73f2de8-29e1-4974-bd87-0c6d23044a36" alt=""><figcaption></figcaption></figure>

Go to the top of the page and select **Reset token**.

<figure><img src="https://3295602690-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMRfG9QvNConKIyipM24L%2Fuploads%2FaTDsILe6O6RQXFgoTdhP%2F5.jpg?alt=media&#x26;token=877b2265-d850-4c08-9771-3a5b0a5ebc42" alt=""><figcaption></figcaption></figure>

Copy generated token.

<figure><img src="https://3295602690-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMRfG9QvNConKIyipM24L%2Fuploads%2FX81aFdFuGX3npirn4NCn%2F6.jpg?alt=media&#x26;token=e1ba80ed-5d71-4b1e-8a28-70545d995050" alt=""><figcaption></figcaption></figure>

Go to [FlexyBot Panel](https://panel.flexy.bot), select **Bots**, click **Create** and paste the copied token into the **Token** text box. Click **Create**. Your bot should be up and running in a few moments.


---

# 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.flexy.bot/general/creating-discord-bot.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.
