> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mavera.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Discord

> 4 production-ready jobs — community sentiment analysis, voice transcript persona language extraction, community FAQ generation, and feature request mining with product focus groups

Discord communities are where your most engaged users live — sharing feedback, asking questions, reporting bugs, and requesting features in real time. These four jobs pull messages from Discord's REST API into Mavera's surfaces (Mave Agent, Brand Voice, Generate, Focus Groups) to analyze community sentiment, extract persona-authentic language from voice transcripts, auto-generate FAQs from community questions, and mine feature requests for product focus groups.

***

## API Reference Card

| Detail            | Value                                                            |
| ----------------- | ---------------------------------------------------------------- |
| **Base URL**      | `https://discord.com/api/v10`                                    |
| **Auth**          | Bot Token (`Bot {token}`) or OAuth 2.0 Bearer                    |
| **Rate limits**   | 50 req/sec global; per-route limits vary (see headers)           |
| **Key endpoints** | `/channels/{id}/messages`, `/guilds/{id}/channels`, `/users/@me` |
| **Mavera base**   | `https://app.mavera.io/api/v1`                                   |
| **Mavera auth**   | `Authorization: Bearer mvra_live_...`                            |

<Info>
  All examples use `DISCORD_BOT_TOKEN` (a bot token with `MESSAGE_CONTENT` intent enabled) and `MAVERA_API_KEY`. Bot must be added to the guild with `Read Message History` and `Read Messages/View Channels` permissions. Enable the Message Content Intent in your app's settings at [discord.com/developers](https://discord.com/developers/applications).
</Info>

***

## Prerequisites

<Steps>
  <Step title="Discord bot application">Create a bot at [discord.com/developers/applications](https://discord.com/developers/applications). Under "Bot", enable `MESSAGE CONTENT INTENT` and copy the bot token.</Step>
  <Step title="Bot permissions">When generating the invite URL, select: `Read Messages/View Channels`, `Read Message History`. For voice transcripts (Job 2), you'll need a separate transcription service.</Step>
  <Step title="Guild and Channel IDs">Enable Developer Mode in Discord (Settings → Advanced → Developer Mode). Right-click channels/guilds to copy IDs.</Step>
  <Step title="Mavera API key">Get your key from [Mavera dashboard](https://app.mavera.io/settings/api-keys).</Step>

  <Step title="Environment variables">
    ```bash theme={"dark"}
    export DISCORD_BOT_TOKEN="your-bot-token"
    export DISCORD_GUILD_ID="your-guild-id"
    export MAVERA_API_KEY="mvra_live_xxxxx"
    ```
  </Step>
</Steps>

***

## Jobs

| # | Job                                                                         | Discord Data           | Mavera Surface        | Output                          |
| - | --------------------------------------------------------------------------- | ---------------------- | --------------------- | ------------------------------- |
| 1 | [Community Sentiment Analysis](community-sentiment)                         | Channel messages       | Mave Agent (Chat)     | Weekly sentiment report         |
| 2 | [Voice Transcript → Persona Language](voice-persona-language)               | Transcripts (external) | Brand Voice           | Community-authentic brand voice |
| 3 | [Community Questions → FAQ Generation](community-faq-generation)            | Channel messages       | Mave Agent + Generate | Auto-generated FAQ              |
| 4 | [Feature Request Mining → Product Focus Group](feature-request-focus-group) | Channel messages       | Focus Groups          | Ranked feature priority list    |

***

## Rate Limits & Production Notes

| Discord Endpoint              | Limit                                  | Strategy                                   |
| ----------------------------- | -------------------------------------- | ------------------------------------------ |
| `GET /channels/{id}/messages` | 50 req/sec global; 5 req/sec per route | 500ms delay; handle 429 with `retry_after` |
| `GET /guilds/{id}/channels`   | 50 req/sec global                      | Cache channel list daily                   |
| `GET /guilds/{id}/members`    | 10 req/sec                             | Cache member data; batch lookups           |

<Warning>
  Discord enforces rate limits per-route with global cap of 50 req/sec. Always check for `429` responses and respect `retry_after`. The `MESSAGE_CONTENT` intent is **required** for reading message content in guilds with 100+ members — enable it in the Developer Portal or you'll get empty strings. Bot must be a guild member with `Read Message History` permission. Store bot tokens in env vars. Monitor Mavera credits at [Dashboard](https://app.mavera.io/settings/usage).
</Warning>

***

<CardGroup cols={3}>
  <Card title="All Integrations" icon="plug" href="/integrations" />

  <Card title="Discord API Docs" icon="discord" href="https://discord.com/developers/docs" />

  <Card title="Brand Voice" icon="microphone" href="/features/brand-voice" />

  <Card title="Focus Groups" icon="users" href="/features/focus-groups" />

  <Card title="Mave Agent" icon="brain" href="/features/mave-agent" />

  <Card title="Generate" icon="pen" href="/features/generate" />
</CardGroup>
