Discord Bot Integration

Connect the ILicence Guard bot to your Discord server. Your buyers can manage licenses directly from Discord with automatic verification, role assignment, and self-service commands.

Step 1: Add ILicence Guard to Your Server

Invite the ILicence Guard bot to your Discord server by clicking the button below. You'll need Manage Guild permissions.

Discord Bot OAuth URL

https://discord.com/oauth2/authorize?client_id=1487712548991012984&permissions=268437520&scope=bot%20applications.commands

This URL requests: Manage Roles, Read Messages, Send Messages, and Slash Command permissions.

Permissions needed

The bot needs permission to create and manage roles. Make sure the ILicence Guard role is positioned above your buyer role in the role hierarchy.

Step 2: Generate a Setup Key

Go to your ILicence dashboard, open the plugin settings, and navigate to the Discord Bot section. Click "Generate Setup Key" to create a temporary key.

Setup Key Details

  • Expires in: 10 minutes
  • One-time use: Can only be used once
  • Binds to: Your Discord server permanently

Copy it fast

The setup key expires in 10 minutes. Copy it immediately and run the setup command before it expires.

Step 3: Run /setup in Discord

In your Discord server, run the /setup command with two arguments: your plugin slug and the setup key you just generated.

/setup plugin-slug:my-plugin setup-key:ABCD1234

Replace my-plugin with your plugin slug (e.g., "super-items") and paste your setup key.

Setup success

You'll see a confirmation message. The bot is now linked to your plugin, creates a Licensed role, and can manage licenses.

Step 4: Your Buyers Can Now Use It

Your buyers can now manage their licenses directly from your Discord server using three main commands.

/link

Buyers run this command to link their marketplace purchase to their Discord account. The bot shows select menus for plugin choice, marketplace selection, and asks for their buyer username. No arguments needed.

/link

Bot shows: Select plugin (if multiple), Select marketplace (Polymart / BuiltByBit / Manual), Enter username modal, then "License linked successfully! Your key: ||XXXX-XXXX||"

/license

Buyers check their current license details: expiration date, max servers, and active servers.

/license

Bot response shows: License type, Expiration (if any), Servers used/max.

/status

Quick status check. Perfect for buyers who need to verify they're still licensed.

/status

Bot response: "Valid" or shows why the license is invalid.

Admin Commands

Server admins can manage the bot configuration and buyer roles.

/licenses

List all linked users and their license details (requires ManageGuild permission)

/revoke <license-key>

Revoke a license by its key. User loses the Licensed role immediately (requires ManageGuild permission)

/remove <plugin-slug>

Remove plugin configuration from this server (requires ManageGuild permission)

/ping

Check bot latency and connection status

Automatic Role Management

The bot automatically handles buyer roles throughout the license lifecycle.

When a license is verified

  • Buyer is assigned the '{PluginName} Licensed' role (e.g., 'PaintArena Licensed')
  • Role persists even if bot goes offline
  • Bot can manage role permissions independently

When a license is revoked

  • Role must be manually removed or will be removed on next bot check
  • License is invalidated via API immediately

Troubleshooting

Bot won't respond to /setup

Cause: Bot doesn't have permissions or setup key expired

Fix: Check bot role position, re-generate setup key, try again

/link says 'Purchase not found'

Cause: Marketplace username doesn't match any purchase

Fix: Verify the buyer's marketplace username is correct and they purchased the plugin

Role not assigned after /link

Cause: Bot role is below buyer role in hierarchy

Fix: Move ILicence Guard role above other roles

Bot offline but roles still work

Cause: Discord cached the roles

Fix: This is normal. Bot reconnects automatically.

Best Practices

  • Keep the ILicence Guard role above your buyer role for proper permission hierarchy
  • The bot auto-creates roles named '{PluginName} Licensed' for each configured plugin
  • Use the bot's role color to make licensed buyers stand out in your community
  • Announce the /link command to new buyers so they can verify themselves
  • Check bot permissions monthly to ensure nothing was accidentally revoked
  • Regularly test /license and /status commands to verify bot is working