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

# Discord Roles

> Add buyers to your Discord server and assign roles automatically when they purchase, with optional expiry.

SellAuth can join a buyer to your Discord server and give them a role the moment their payment clears. This is how paid access, supporter roles and subscription tiers are usually delivered on Discord.

## Connect your bot first

Roles cannot be configured until a Discord application is connected to your shop, under [**Discord Auto Join & Role**](https://dash.sellauth.com/shop#discord) in shop settings. That needs a client ID, a client secret and a bot token from your own Discord application.

The bot has to be in the server, and its role has to sit **above** the roles it will assign. Discord does not let a bot grant a role equal to or higher than its own. When that happens the assignment fails with no visible error, so a setup that looks correct does nothing at all.

## Configure roles on a variant

Roles are set per variant, so a monthly tier and a lifetime tier on the same product can grant different access.

| Field | Meaning |
| - | - |
| **Discord Server** | The server the buyer joins |
| **Discord Role** | The role assigned on purchase |
| **Remove In** | Optional duration after which the role is removed. Requires a plan that includes role removal |

**Remove In** is what makes timed access work. A 30 day role on a monthly product expires on its own, with no cleanup from you. Without a plan that includes role removal, the roles you grant stay until you take them off by hand.

## Requiring a Discord login

Delivery needs to know which Discord account to act on. Turn on **Force Discord Login** on the product so buyers authenticate before purchase, which links their Discord account to the order.

Without it, a buyer can complete checkout with no Discord account attached, and there is nobody to add to the server.

The same integration also lets customers sign in to their dashboard with Discord. See [Signing in](/guides/customers#signing-in) for how accounts are matched and where to switch it off.

## Troubleshooting

**Nothing happens after purchase.** Check the bot's role position first, then that the bot is still in the server.

**Buyer was added but received no role.** Same cause, in the case where the bot can join people but cannot assign that particular role.

**No Discord account on the order.** Force Discord Login was off when they bought. Add the role by hand and turn the setting on.

**Role never expires.** Remove In was left empty. It is set per variant, so check the variant they bought rather than the product.

## Next steps

<CardGroup cols={2}>
  <Card title="How delivery works" icon="truck" href="/guides/delivery">
    What else runs when a payment clears.
  </Card>

  <Card title="Products and variants" icon="box" href="/guides/products">
    Where Force Discord Login is configured.
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.