> 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/zh/cha-jian-yu-ji-cheng/other-integrations/discord.md).

# Discord

将 Convai 角色与 Discord Bot 集成

### 概述

本文档将列出创建你自己的 Discord 机器人、将其连接到 Convai 角色，以及托管机器人服务器以便 Discord 用户访问所需的步骤。

{% hint style="info" %}
欢迎加入我们的 [Discord 服务器](https://discord.gg/TG98s8FWKN) 在打造自己的 Convai 角色的同时，成为充满创新精神和热情的开发者社区的一员。
{% endhint %}

### 创建角色

在继续托管 Discord 机器人服务器之前，我们先创建自己的角色，以便将机器人连接到该角色。请按照此页面中的步骤，轻松开始创建一个简单的角色。

{% content-ref url="/pages/35a85ab8078743525dfb21372f6c08398990e426" %}
[Broken mention](broken://pages/35a85ab8078743525dfb21372f6c08398990e426)
{% endcontent-ref %}

现在我们已经创建了角色，接下来进入下一步。

{% content-ref url="/pages/4962146a2711a90f7d66bd1793102e867c6a7580" %}
[创建 Discord Bot](https://docs.convai.com/api-docs/zh/cha-jian-yu-ji-cheng/other-integrations/discord/create-a-discord-bot.md)
{% endcontent-ref %}

{% hint style="warning" %}
Convai 正在研究由我们为你托管机器人服务器的解决方案，这样你就无需按照上述步骤自行托管。找到解决方案后，我们会立即更新文档。
{% endhint %}


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.convai.com/api-docs/zh/cha-jian-yu-ji-cheng/other-integrations/discord.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
