# Discord Bot Configuration

> Configure your Discord subscription bot with roles, channels, and permissions for managing paid memberships

Source: https://docs.botsubscription.com/discord/configuration/

Learn how to configure your Discord subscription bot to manage paid memberships for your server. BotSubscription automates role-based access control, letting you run a paid Discord server with automatic subscriber management.

## How It Works

BotSubscription uses roles to manage access on Discord:

1. Subscribers pay through the bot or web portal
2. BotSubscription automatically assigns a premium role
3. When the subscription expires, the role is removed
4. Use Discord's built-in permissions to control what the role can access

## Adding BotSubscription to Your Server

### Step 1: Invite the Bot

1. Click the [Add to Discord](https://discord.com/oauth2/authorize?client_id=1450165076421247046&permissions=8&response_type=code&redirect_uri=https%3A%2F%2Fapi.botsubscription.com%2Fv2%2Foauth%2Fdiscord%2Fcallback&integration_type=0&scope=identify+email+guilds.join+bot) button
2. Select the server you want to add the bot to
3. Click **Authorize**

### Step 2: Configure Bot Role Position

<Warning>
This step is critical! The bot can only assign roles that are **below** its own role in the hierarchy.
</Warning>

1. Go to **Server Settings > Roles** in Discord
2. Find the **BotSubscription** role (created automatically)
3. Drag it **above** any roles you want the bot to manage
4. Click **Save Changes**

### Step 3: Create Premium Role(s)

Create the role(s) that subscribers will receive:

1. Go to Server Settings > Roles
2. Click Create Role
3. Name it (e.g., "Premium Member", "VIP", "Subscriber")
4. Configure permissions for what premium members can access
5. Save the role

<Tip>
You can create multiple roles for different subscription tiers (e.g., Bronze, Silver, Gold).
</Tip>

### Step 4: Create Plans and Link Roles

Before members can subscribe, you need to create subscription plans and link them to Discord roles:

1. **Create a plan** - Set up your subscription tiers with pricing and duration (see [Create a Subscription Plan](https://docs.botsubscription.com/dashboard/plans/#create-a-subscription-plan))
2. Go to **Targets** in your BotSubscription dashboard
3. Click **Add Target** and select your Discord server
4. Choose which role to assign for each plan

## Setting Up Premium Channels

Use Discord's channel permissions to create subscriber-only areas:

### Create a Private Category

1. Right-click your server name > **Create Category**
2. Name it (e.g., "Premium Content")
3. Click the gear icon to edit permissions
4. Turn off **View Channel** for `@everyone`
5. Add your premium role and enable View Channel

### Create Private Channels

1. Right-click your premium category > **Create Channel**
2. The channel inherits the category's permissions
3. Premium role members can see it, others cannot

## Slash Commands

BotSubscription provides a comprehensive set of slash commands for both members and admins. For a full list of available commands and their descriptions, see the [Bot Commands reference](https://docs.botsubscription.com/commands/).

<Note>
Commands are slash commands. Type `/` in any channel to see available commands from BotSubscription.
</Note>

## How Members Subscribe

Once your Discord subscription bot is set up, members can subscribe in two ways:

1. **Via bot command** - Using the `/subscribe` command directly in Discord
2. **Via web portal** - Through your project's web portal

For the complete subscription flow with step-by-step instructions, see the [Subscription Flow Guide](https://docs.botsubscription.com/subscriptions/bot-flow/).

## Multiple Servers

Each Discord server operates as a separate, isolated project in BotSubscription. If you want to add subscription management to additional servers:

1. Invite the bot to the new server
2. A new project is created automatically for that server
3. Configure plans, roles, and payment methods independently for each server

This isolation ensures each server has its own subscribers, plans, and settings without affecting your other communities.

## Automatic Role Management

The Discord subscription bot keeps roles synchronized automatically:

### When a User Subscribes
- Role is assigned within seconds of payment
- User receives a DM confirmation (if DMs are enabled)
- A detailed notification is sent to your [Backoffice #payments](https://docs.botsubscription.com/discord/backoffice/#payment-notifications) channel

### When a Subscription Expires
- Role is removed automatically
- Happens at the end of the billing period
- User receives notification before expiry
- A log entry is created in your [Backoffice #notifications](https://docs.botsubscription.com/discord/backoffice/#access-removal-notifications) channel

### When a User Cancels
- Role stays until the end of the paid period
- Role is removed when the period ends
- Cancellation status is updated in the [Backoffice](https://docs.botsubscription.com/discord/backoffice/)

### When a User Rejoins the Server
- If they leave and rejoin while their membership is active, roles are automatically reassigned
- This continues for the duration of their membership

## Best Practices for Your Paid Discord Server

### Role Organization

```
Server Owner (you)
├── Admin roles
├── Moderator roles
├── BotSubscription (bot role)  <-- Must be here or higher
├── Premium Gold               <-- Bot can manage these
├── Premium Silver
├── Premium Bronze
└── @everyone
```

### Channel Structure

```
YOUR SERVER
├── #members-only (restricted - subscribers only)
├── #rules
├── #general (public)
├── #support (public)
│
├── BOTSUBSCRIPTION • BACKOFFICE (admin only)
│   ├── #payments
│   ├── #notifications
│   ├── #support-log
│   ├── #support-threads
│   └── 🔊 Memberships: 0
│
└── Voice Channels
    └── 🔊 General
```

<Note>
The bot automatically creates the Backoffice category and channels when added to your server. For more details on monitoring these channels, see the [Backoffice guide](https://docs.botsubscription.com/discord/backoffice/).
</Note>

## Troubleshooting Your Discord Payment Bot

### Bot Can't Assign Roles

1. Check that the bot role is above the target role in hierarchy
2. Verify the bot has **Manage Roles** permission
3. Make sure the role exists and is linked in BotSubscription

### Users Can't See Premium Channels

1. Verify the premium role has View Channel permission
2. Check that `@everyone` has View Channel disabled
3. Ensure the user actually has the premium role

### Slash Commands Not Working

1. Wait a few minutes for Discord to sync commands
2. Check that commands aren't restricted to specific channels
3. Ensure the bot is online and has proper permissions

## Next Steps

<CardGroup cols={2}>
  <Card title="Create Subscription Plans" href="https://docs.botsubscription.com/dashboard/plans/#create-a-subscription-plan" description="Set up pricing tiers and duration for your paid Discord roles">
    Configure your subscription plans
  </Card>
  <Card title="Set Up Payments" href="https://docs.botsubscription.com/payments/" description="Connect Stripe, PayPal, or cryptocurrency to start accepting payments">
    Configure payment methods
  </Card>
</CardGroup>
