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

# Discord Bot

> Learn how to use the MC License Discord Bot to manage your Minecraft plugin licenses from your own Discord server.

## Getting Started

Add the MC License bot to your Discord server to manage your plugin licenses directly through Discord. To add the bot:

1. <Link href="https://discord.com/oauth2/authorize?client_id=1305262684580610068&permissions=68608&integration_type=0&scope=bot+applications.commands" target="_blank">Use this link</Link>
2. Select the server you would like to add it to
3. Follow Discord's server authorisation process

## Linking Your Discord Account

Before using the bot, you'll need to link your Discord account with your MC License dashboard account:

1. Navigate to your [Account](https://dash.mclicense.org/account) page
2. Locate the 'Connected Accounts' section
3. Click 'Connect' next to Discord and follow the authentication flow

<Note>
  Linking your Discord account is required to ensure secure access to your licenses through the bot.
</Note>

## Commands

### Creating a New License

The `/createlicense` command allows you to generate new licenses for your plugins through an interactive interface.

<Note>
  All license creation interactions are ephemeral, meaning only you can see them.
</Note>

#### Steps to Create a License:

1. Type `/createlicense` in any channel
2. A dropdown menu will appear showing your available plugins
3. Select the plugin you want to create a license for
4. Fill out the license details in the modal:
   * **User**: The user who will be assigned the license, as a string
   * **Max IPs**: Maximum number of IP addresses allowed to use this license, as an integer
   * **Expiry Date**: When the license will expire

<Tip>
  When setting the expiry date, use the format DD/MM/YYYY (e.g. 01/01/2024).
</Tip>

### Editing an Existing License

Use the `/editlicense` command to modify the details of an existing license.

#### Command Usage:

```bash theme={null}
/editlicense <licenseKey>
```

#### Parameters:

* `licenseKey`: The license key that you'd like to edit

After entering the command with a valid license key, a modal will open allowing you to update:

* **User**: The user who will be assigned the license, as a string
* **Max IPs**: Maximum number of IP addresses allowed to use this license, as an integer
* **Expiry Date**: When the license will expire

<Warning>
  Make sure you have the necessary permissions to edit licenses before using this command.
</Warning>

## Best Practices

* Keep your license keys secure and don't share them publicly
* Regularly review active licenses to ensure they're assigned to the correct users
* Set appropriate IP limits based on your plugin's intended use case
* Consider setting reasonable expiration dates to maintain control over license distribution

## Troubleshooting

If you encounter any issues:

* Verify the bot has the necessary permissions in your Discord server
* Ensure you're using the correct command syntax
* Check that the license key exists when using `/editlicense`
* Contact support if you continue experiencing problems
