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

# Discord Bot Integration

Our official Discord bot provides deep integration for your community, including automatically syncing roles on your server with permissions in the CAD!

<figure><img src="https://232668649-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M4pGN81fb4R6zFhodcu%2Fuploads%2FXflRHFjkM5FfY92JVm47%2FCMSxCAD.webp?alt=media&amp;token=5fbcf2f3-e885-45f5-95cb-1af430416c46" alt=""><figcaption></figcaption></figure>

### Getting Started

Get started with SonoranBot today by inviting it to your Discord:

{% content-ref url="/spaces/gJnyZgUQPWpA5p9njAAR/pages/1jdipf4RgfuLEZ4nlTrv" %}
[Getting Started](/bot/tutorials/getting-started.md)
{% endcontent-ref %}

### CAD Integration

Learn more about SonoranBot's CAD integration features:

{% content-ref url="/spaces/gJnyZgUQPWpA5p9njAAR/pages/WznsA2eFX2EUFOOLkIry" %}
[Sonoran CAD Integration](/bot/tutorials/sonoran-cad-integration.md)
{% endcontent-ref %}

### Settings

Configure SonoranBot's settings in your server:

{% content-ref url="/spaces/gJnyZgUQPWpA5p9njAAR/pages/RmmQ4VmMQYTRebFbBdZq" %}
[Settings](/bot/tutorials/usage/settings.md)
{% endcontent-ref %}

### Commands

Reference a list of bot commands:

{% content-ref url="/spaces/gJnyZgUQPWpA5p9njAAR/pages/XGzCFTCXEaoQLNxXPwBB" %}
[Commands](/bot/tutorials/usage/commands.md)
{% endcontent-ref %}

### Generate a permission code in CAD

In **Administration > Accounts > Permission Keys**, open **Bot permissions**. Select page, administrative, and per-template record permissions in the builder, then copy the generated code for your bot role mapping. This builds a code; it does not directly change account permissions.

Use **Edit selected fields on others' records** with template fields marked **Allow limited editing** for restricted updates. **Edit any** grants full editing access instead. See [Granting Account Permissions](/cad/tutorials/getting-started/permissions.md#record-editing-permissions) before changing an existing role mapping.


---

# 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.sonoransoftware.com/cad/integration-plugins/discord-bot-integration.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.
