> For the complete documentation index, see [llms.txt](https://guides.paynow.gg/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://guides.paynow.gg/integrations-and-commands/discord-servers.md).

# Discord Servers

Linking Discord lets purchases trigger actions there. Most stores use it to assign a role, so a supporter's rank shows in the community as well as in game.

*Dashboard → Integrations → Discord Servers. Needs `discord_server_read`.*

## Linking a server

### 1. Create the entry

1. Go to **Integrations → Discord Servers**.
2. Click **Add Discord Server**.
3. A window appears with instructions to add the PayNow bot and a registration command.

The entry stays at status **Not linked** until registration completes.

### 2. Add the bot and register

1. Click the entry to open the **Discord Server details** window.
2. Click **Add Bot** to invite the official PayNow Discord bot.
3. Complete Discord's authorisation flow.
4. **Position the bot's role above the roles you want it to manage** in your server's role hierarchy.
5. Copy the registration command, for example `/pnregister YOUR_SERVER_KEY`.
6. Run it in any text channel on your Discord server.

Once registered, the entry shows your Discord server name and ID.

<figure><img src="/files/1togoIXYFx8xNVi26Ojq" alt="The Discord Servers page showing one linked server and one awaiting registration."><figcaption></figcaption></figure>

{% hint style="danger" %}
**Step 4 causes more failures here than everything else combined.** Discord won't let a bot manage roles positioned above its own, so the role is never applied. The purchase itself still completes; the failed Discord action is recorded on the order's timeline.

In **Server Settings → Roles**, drag the PayNow bot's role above every role it needs to grant. Do this before your first sale, not after the first complaint.
{% endhint %}

## What Discord actions can do

Once linked, a product can assign a role, kick a user, ban a user, or generate an invite link. Configure these under **Deliverable Actions** on the [product](/products/creating-a-product.md). [Discord Linking](/integrations-and-commands/discord-linking.md) walks through the purchase-to-role setup.

Each action is pointed at one of your linked Discord servers, chosen from a dropdown on the action itself. A server that is still **Not linked** does not appear in that dropdown.

## Re-linking and removing

| State          | What clicking the entry does                          |
| -------------- | ----------------------------------------------------- |
| **Not linked** | Opens the linking UI so you can repeat registration.  |
| **Linked**     | Opens a details window with **Delete** and **Close**. |

**Delete** fully unlinks the Discord server from your PayNow account. If a server shows as *Not linked*, click it and run the registration command again.

## Customers who forget to link Discord

Someone buys a Discord perk without linking their account, then asks why they have no role. Two fixes:

* On the [order](/orders-and-subscriptions/orders.md), hover the Discord icon on the line item to copy the Discord account-linking link for that order, and send it to them.
* On the customer's [inventory](/customers/managing-customers.md#inventory) item, use the **Discord button** to enter their Discord User ID directly.
