Usage

This guide explains how to set up and use the KeyAuth Bot to manage applications, keys, and users from Discord.


Getting Started

1

Configure the bot

Open config.json to configure the bot.

2

Enter your credentials and settings

Enter your Discord bot token, user IDs, roles, and database settings as needed.

circle-info

Notes:

  • bot_token: Your Discord bot token.

  • whitelisted_users: Array of Discord user IDs who have access.

  • status: Customize bot status (playing, watching, listening, etc.).

  • database_settings: Make sure MongoDB is installed and running.

Sample Configuration (config.json)

config.json
{
  "bot_token": "YOUR_BOT_TOKEN_HERE",
  "whitelisted_users": ["YOUR_DISCORD_USER_ID"],
  "whitelisted_roles": [],
  "embed_color": "#6c02ff",
  "customer_role": "YOUR_CUSTOMER_ROLE_ID",
  "log_channel": "YOUR_LOG_CHANNEL_ID",
  "status": {
    "type": "listening",
    "message": "Orders"
  },
  "key_name": "YOUR_KEY_NAME_PATTERN",
  "database_settings": {
    "url": "mongodb://localhost:27017",
    "name": "MOONLY-AUTH"
  }
}

Commands

/add-app

Description: Adds a new application to the KeyAuth system. Usage:

/create-key

Description: Generates a new unique key for the specified application. Usage:

/create-reseller-account

Description: Creates a reseller account and assigns keys. Usage:

/delete-reseller-account

Description: Deletes a reseller account. Usage:

/delete-app

Description: Removes an application. Usage:

/delete-key

Description: Deletes a key from an application. Usage:

/downloads

Description: Shows download stats or provides links. Usage:

/redeem-key

Description: Activates a key for a user. Usage:

/reset-hwid

Description: Resets a user's hardware ID. Usage:

/user-info

Description: Retrieves information about a user. Usage:

/view-users-keys

Description: Lists all keys associated with a user. Usage: