> For the complete documentation index, see [llms.txt](https://docs.convai.com/api-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.convai.com/api-docs/plugins-and-integrations/other-integrations/discord/create-a-discord-bot.md).

# Create a Discord Bot

Follow the next set of steps to create your own Discord bot:

1. Navigate to [Discord Developer Portal](https://discord.com/developers/applications)

   <figure><img src="/files/3iLPdhRb5T9hwRIVmcDq" alt=""><figcaption></figcaption></figure>
2. Click on **New Application**

   <figure><img src="/files/ZdEEhC5tbVGIGzThaALA" alt=""><figcaption></figcaption></figure>
3. Enter the name of the bot that you want to create. Let's go with **ConvaiTracy**
4. Accept the Developer Terms of Service and Developer Policy and click on **Create**.

   <figure><img src="/files/Fdp9YsyazNinVadVWJ4K" alt=""><figcaption></figcaption></figure>
5. Now, you land on the application details page. Upload an app icon and provide a description as you see fit. and click on Save Changes.

   <figure><img src="/files/z8Z4z9EbyCaBYRy5ulta" alt=""><figcaption></figcaption></figure>
6. Then click on **OAuth2** --> **URL Generato**r

   <figure><img src="/files/hDox4fyVw9PBqOlNSqs0" alt=""><figcaption></figcaption></figure>
7. Click on the **bot** checkbox under the **Scopes** section

   <figure><img src="/files/NLj2s7pUJABZOVlgum8Z" alt=""><figcaption></figcaption></figure>
8. Click on the following checkboxes under the various Permissions

   1. General Permissions:
      1. Manage Webhooks
   2. Text Permissions:
      1. All the checkboxes
   3. Voice Permissions:
      1. Connect
      2. Speak
      3. Use Voice Activity
      4. Priority Speaker
      5. Request To Speak

   <figure><img src="/files/Ry5JWkiFXYD81ZZzpU9E" alt=""><figcaption></figcaption></figure>
9. Copy the URL generated below. This will be the shareable invite link for the bot on all servers.

   <figure><img src="/files/ttTw2sT9Weyf7JoY9Rrw" alt=""><figcaption></figcaption></figure>
10. Next click on **Bot**
11. Click on **Add Bot** --> **Yes, do it!**

    <figure><img src="/files/LrOmRQeyM4RbuN3A0DdH" alt=""><figcaption></figcaption></figure>
12. Allow the following intents under the **Privileged Intents** section and click on **Save Changes.**

    <figure><img src="/files/MAQ3LjBICURH241xm1TP" alt=""><figcaption></figcaption></figure>
13. Click on **Reset Tokens** to generate a new token for the bot. Then click on **Yes, do it**

    <figure><img src="/files/mXmoOJPnven6Tkxs3Pat" alt=""><figcaption></figcaption></figure>
14. **Copy** the generated token to be used later for hosting the bot server.

Now we move on to connecting the Discord bot with a Convai Character and hosting the server.

{% content-ref url="/pages/XfOpYrwwSHDpZRsAL0Fe" %}
[Hosting Discord Bot from Personal Server](/api-docs/plugins-and-integrations/other-integrations/discord/hosting-discord-bot-from-personal-server.md)
{% endcontent-ref %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.convai.com/api-docs/plugins-and-integrations/other-integrations/discord/create-a-discord-bot.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
