# Discord Integration

## Bot User Guide for your ML App

Welcome to the guide for the Discord bot designed to manage your ML application. This bot allows you to fully customize the user experience, manage your products (loaders), communicate with your customers, and much more, directly from Discord.

**Key Principles:**

* **Slash Commands (`/`):** All interactions with the bot use slash commands.
* **Centralized Management:** Modify your application's appearance, content, and behavior from one place.
* **Permissions:** Some commands are restricted to "ML Cloud" owners or global administrators. Your "ML Cloud" refers to your specific instance and configuration of the application managed via this bot, stored in a dedicated repository.

***

## 🚀 Loader (Product) Management

This section covers managing the software (referred to as "loaders") that your end-users can download and launch through the application.

### `/status`

Displays the current status of all loaders configured in your application (ML Cloud).

* **Description:** Provides an overview of your products, grouped by category, showing their names and current statuses. Possible statuses are:
  * `🟢 Online`: The loader is operational.
  * `🟡 Updating`: The loader is being updated (a warning might be shown).
  * `🔴 Offline`: The loader is disabled and cannot be launched.
  * `🟠 Risky`: The loader is functional but may pose risks or is in testing (a warning might be shown). This replaces the previous `custom`/`development` status.
* **Usage:**

  ```
  /status
  ```
* **Result:** An embed message listing all loaders, organized by category (ex: `BO6`, `Modern Warfare`, etc.) with their status indicated by an emoji and the corresponding text. The list is no longer numbered.

***

### `/add_loader`

Adds a new loader to your application.

* **Parameters:**
  * `loader_name` (String, Required): The name of the loader as it will appear in the application (max 50 characters, no special characters like `/`, `\`, `|`).
  * `loader_url` (URL, Required): The direct download link for the loader file (ex: `.exe`, `.bat`).
  * `category` (Choice, Required): The category under which the loader will be organized (ex: BO6, MW3, Spoofers...).
  * `status` (Choice, Optional): The initial status of the loader (`Online`, `Updating`, `Offline`, `Risky`). **Default:** `🟢 Online`.
  * `exe_name` (String, Optional): The unique identifier used internally (sometimes the executable name without extension). **Default:** Uses the value of `loader_name`.
  * `image_url` (URL, Optional): The URL of an image to display for this loader in the application.
  * `product_url` (URL, Optional): The URL to an information or sales page for this product (used for the "View Product" button).
* **Example Usage:**

  ```
  /add_loader loader_name:Super Tool V3 loader_url:https://example.com/tool_v3.exe category:MW3 status:🟢 Online product_url:https://store.example.com/super-tool
  ```
* **Result:** Confirms the addition of the loader in your ML Cloud and displays the configured details.

***

### `/update_loader`

Updates the information of an existing loader, identified by its name. This command replaces the previous `/update_status` and `/rename_loader` commands.

* **Parameters:**
  * `loader` (String, Required): The exact name of the loader to update (autocomplete available).
  * `loader_url` (URL, Optional): The new download URL.
  * `status` (Choice, Optional): The new status (`Online`, `Updating`, `Offline`, `Risky`).
  * `image_url` (URL, Optional): The new image URL.
  * `product_url` (URL, Optional): The new product page URL.
  * `loader_name` (String, Optional): The new display name for the loader.
  * `exe_name` (String, Optional): The new internal identifier (`id`).
  * `category` (Choice, Optional): The new category for this loader.
* **Example Usage:**

  ```
  /update_loader loader:Super Tool V3 status:🟡 Updating loader_url:https://example.com/tool_v3.1.exe
  ```
* **Result:** Confirms the update of the specified loader and shows the modified fields.

***

### `/delete_loader`

Deletes a loader from your application, identified by its name.

* **Parameters:**
  * `loader` (String, Required): The exact name of the loader to delete (autocomplete available).
* **Example Usage:**

  ```
  /delete_loader loader:Super Tool V3
  ```
* **Result:** Confirms the deletion of the loader. **Warning:** This action is irreversible.

***

### `/move_loader`

Changes the position of a loader within its category in the application UI.

* **Parameters:**
  * `loader` (String, Required): The name of the loader to move (autocomplete available).
  * `position` (Choice, Required): The desired new position:
    * `Top`: Moves the loader to the top of its category.
    * `Up`: Moves the loader up one position in its category.
    * `Down`: Moves the loader down one position in its category.
    * `Bottom`: Moves the loader to the bottom of its category.
* **Example Usage:**

  ```
  /move_loader loader:Super Tool V3 position:Top
  ```
* **Result:** Confirms the change in the loader's position.

***

## 🎨 Application Customization & Content

Configure the appearance, links, general settings, and communications of your application.

### `/setup`

Configures external links and general settings for your application.

* **Parameters:**
  * `category` (Choice, Required): The type of configuration to modify:
    * `Links`: To manage URLs accessible from the application.
    * `Settings`: For general application parameters.
  * `option` (String, Required): The specific element to modify (autocomplete based on category):
    * **For Links:** `Discord Link`, `Website Link`, `TikTok Link`, `YouTube Link`, `Telegram Link`, `Reddit Link`, `Guide Link`.
    * **For Settings:** `Loaders View` (List or Gallery), `Language` (default language code, ex: `en`, `fr`).
  * `value` (String, Required): The new value for the chosen option (autocomplete available for `Loaders View` and `Language`).
* **Example Usage:**

  ```
  /setup category:Links option:Discord Link value:https://discord.gg/your-server
  /setup category:Settings option:Loaders View value:Gallery
  /setup category:Settings option:Language value:en
  ```

***

### `/customize`

Customizes the visual appearance (design) of your application's interface.

* **Parameters:**
  * `option` (Choice, Required): The design element to customize:
    * `Logo Image`: URL of the main logo .
    * `Background Image`: URL of the custom background image.
    * `Background Color`: Main background color (#hex).
    * `Theme Color`: Primary/secondary theme color.
    * `Border Color`: Color of borders (#hex).
    * `Divider Color`: Color of separators (#hex).
    * `Scrollbar Color`: Color of the scrollbar (#hex).
    * `Background Animation`: Type of background animation (`Snow`, `Stars`, `Particles`, `Inactive`).
    * `Border Radius`: Radius of rounded corners (small, medium, large).
    * `Button Color`: Color of buttons (category, action).
    * `Text Color`: Color of text (primary, secondary).
  * `sub_option` (String, Optional): Required for `Theme Color`, `Border Radius`, `Button Color`, `Text Color` to specify which aspect to modify (ex: `main_color`, `small`, `action`, `primary`). Autocomplete available.
  * `value` (String, Required): The new value (URL, #hex, animation name, px value). Autocomplete available for colors, animations, and radii.
* **Example Usage:**

  ```
  /customize option:Logo Image value:https://example.com/my_logo.png
  /customize option:Background Color value:#1a1a1d
  /customize option:Theme Color sub_option:main_color value:#ff4d4d
  /customize option:Border Radius sub_option:medium value:10px
  ```

***

### `/add_news`

Adds a notification (announcement, promotion, warning) displayed within the application to your users. This is a powerful native communication channel.

* **Parameters:**
  * `type` (Choice, Required): The type of notification (`📢 Announcement`, `🏷️ Discount`, `⚠️ Warning`).
  * `title` (String, Required): The title of the notification.
  * `message` (String, Required): The content/description of the notification.
  * `duration` (Number, Required): The duration for which the notification will be active.
  * `unit` (Choice, Required): The time unit for the duration (`Minute`, `Hour`, `Day`, `Week`, `Month`).
  * `priority` (Choice, Optional): The display priority (`High`, `Normal`, `Low`). **Default:** `Normal`.
  * `start_date` (String, Optional): Start date in ISO format (`YYYY-MM-DDTHH:MM:SSZ`). **Default:** Current time.
  * `button_1_txt` (String, Optional): Text for the first call-to-action (CTA) button.
  * `button_1_url` (URL, Optional): URL for the first CTA button.
  * `button_2_txt` (String, Optional): Text for the second CTA button.
  * `button_2_url` (URL, Optional): URL for the second CTA button.
* **Example Usage:**

  ```
  /add_news type:🏷️ Discount title:Weekend Sale! message:Get 20% off all products this weekend only! duration:2 unit:Day button_1_txt:Shop Now button_1_url:https://store.example.com/sale
  ```
* **Result:** Adds the notification to your ML. Expired notifications are automatically cleaned up.

***

### `/edit_autoguide`

Views and edits the configuration for the Auto-Guide feature. The Auto-Guide helps users configure their system for optimal compatibility.

* **Description:** This command displays the current Auto-Guide configuration in an interactive embed. You can enable/disable the entire feature, enable/disable specific system checks, toggle expected values for checks, and edit tutorial links associated with checks.
* **Usage:**

  ```
  /edit_autoguide
  ```
* **Result:** An embed message showing the current status of each check (ex: `🟢 Enabled`, `🔴 Disabled`). Buttons allow you to:
  * `Edit checks`: Select which system checks should be actively performed.
  * `Toggle checks`: Define the *expected* outcome for each check (ex: should Virtualization be Enabled or Disabled for your software?). *This part might be advanced, ensure you understand the implications.*
  * `Edit links`: Add or modify tutorial URLs for specific checks to guide users.
  * `Enable`/`Disable`: Toggle the entire Auto-Guide feature on or off.

***

### `/display_ml`

Displays a comprehensive overview of your current ML Cloud's configuration settings, covering links, branding, theme, and general settings.

* **Usage:**

  ```
  /display_ml
  ```
* **Result:** An embed message summarizing your configuration, organized into sections:
  * `🔗 Links`: Shows configured URLs (Discord, Website, TikTok, YouTube, Telegram, Reddit, Guide).
  * `®️ Branding`: Shows the configured Logo Image and Background Image URLs.
  * `🎨 Core Colors`: Displays the primary theme colors (Primary, Secondary, Background, Border, Divider, Scrollbar).
  * `🖋️ Text & Buttons`: Shows configured colors for text (Primary, Secondary) and buttons (Category, Action).
  * `✨ Appearance`: Displays the selected Background Animation and Border Radius settings (Small, Medium, Large).
  * `⚙️ General Settings`: Shows the configured Loaders View (List or Gallery) and the Default Language.

The embed's side color will reflect the primary theme color if set. Values that are not configured will typically show as `Not Set`.

***

## ☁️ ML Cloud & Permissions Management

Manage access and ownership of different application instances (ML Clouds). Primarily for setups involving multiple users or resellers.

### `/my_repos`

Displays all ML Clouds (repositories) you are assigned to and your role within each (Owner or Admin).

* **Usage:**

  ```
  /my_repos
  ```
* **Result:** An embed listing the ML Clouds associated with your Discord account.

***

### `/ml_perms`

Displays the owner and co-admins for a specific ML Cloud.

* **Parameters:**
  * `repo_name` (String, Optional): The name of the ML Cloud to check. If omitted, checks the Cloud you own or are admin of. **Required for global admins checking other Clouds.**
* **Permissions:** Can be used by the owner/co-admins of the Cloud, or by global admins (defined in `admin_role_ids`) to check any Cloud.
* **Usage:**

  ```
  /ml_perms
  /ml_perms repo_name:CLIENT_XYZ_ML_V5
  ```
* **Result:** An embed listing the Owner and any assigned Co-Admins for the specified ML Cloud.

***

### `/assign`

Assigns another Discord user as a co-admin to an ML Cloud. Co-admins have full permissions to manage the Cloud via the bot, except for transferring ownership or deleting the Cloud.

* **Parameters:**
  * `user_id` (User, Required): The Discord user (@mention or ID) to assign.
  * `repo_name` (String, Optional): The ML Cloud to assign the user to. If omitted, uses the Cloud you own. **Required for global admins assigning to other Clouds.**
* **Permissions:** Only the **Owner** of the ML Cloud or a **Global Admin** can use this command.
* **Usage:**

  ```
  /assign user_id:@NewAdmin
  /assign user_id:@NewAdmin repo_name:CLIENT_XYZ_ML_V5
  ```
* **Result:** Confirms that the user has been granted co-admin permissions for the specified ML Cloud in the database.

***

### `/unassign`

Removes a user's co-admin permissions from an ML Cloud. Owners can also unassign themselves.

* **Parameters:**
  * `user_id` (User, Required): The Discord user (@mention or ID) to unassign.
  * `repo_name` (String, Optional): The ML Cloud to unassign the user from. If omitted, uses the Cloud you own. **Required for global admins unassigning from other Clouds.**
* **Permissions:** Only the **Owner** of the ML Cloud or a **Global Admin** can unassign co-admins. Owners can unassign themselves.
* **Usage:**

  ```
  /unassign user_id:@OldAdmin
  /unassign user_id:@Myself  # If you are the owner
  ```
* **Result:** Confirms that the user's co-admin permissions have been revoked for the specified ML Cloud in the database.

***

### `/transfer`

**(Admin Only)**  Transfers ownership of an ML Cloud to another Discord user. The previous owner becomes a co-admin.

* **Parameters:**
  * `new_owner` (User, Required): The Discord user who will become the new owner.
  * `repo_name` (String, Required): The name of the ML Cloud to transfer.
* **Permissions:** Only the **current Owner** of the ML Cloud can initiate a transfer.
* **Usage:**

  ```
  /transfer new_owner:@Successor repo_name:MY_CLOUD_ML_V5
  ```
* **Result:** Confirms the ownership transfer in the database. The `new_owner` becomes the Owner, and the user who ran the command becomes a Co-Admin.

***

### `/create_repo`

**(Admin Only)** Creates a new ML Cloud repository by cloning a default template (`DEFAULT_ML_V5`).

* **Parameters:**
  * `username` (User, Required): The Discord user who will be the owner of the new ML Cloud.
  * `repo_name` (String, Required): The desired name for the new repository on GitHub (ex: `CLIENT_XYZ_ML_V5`).
  * `second_username` (User, Optional): An additional user to be assigned as a co-admin immediately.
* **Permissions:** Requires a **Global Admin** role (defined in `admin_role_ids`).
* **Usage:**

  ```
  /create_repo username:@NewClient repo_name:CLIENT_XYZ_ML_V5 second_username:@ClientAdmin
  ```
* **Result:** Creates a new repository on GitHub under the bot's account, clones the content from the template, and registers the new Cloud and its owner/admin in the database.

***

### `/delete_repo`

**(Admin Only)** Deletes an ML Cloud from the database and optionally from GitHub.

* **Parameters:**
  * `repo_name` (String, Required): The name of the ML Cloud repository to delete.
  * `on_github_too` (Boolean, Optional): If set to `True`, attempts to permanently delete the repository from GitHub as well. **Default:** `False`.
* **Permissions:** Requires a **Global Admin** role or **Ownership** of the specific ML Cloud.
* **Usage:**

  ```
  /delete_repo repo_name:OLD_CLIENT_ML_V5
  /delete_repo repo_name:OLD_CLIENT_ML_V5 on_github_too:True
  ```
* **Result:** Removes the ML Cloud configuration from the bot's database. If `on_github_too` is `True`, it also deletes the repository from GitHub. **Warning: Deletion from GitHub is permanent and irreversible.**

***

### `/allrepos`

**(Admin Only)** Displays a list of all existing ML Clouds registered in the database, along with their owners and co-admins.

* **Permissions:** Requires a **Global Admin** role (defined in `admin_role_ids`).
* **Usage:**

  ```
  /allrepos
  ```
* **Result:** An embed listing all ML Clouds, showing the owner and any co-admins for each.

***

## 🛠️ Utility Commands

### `/commands`

Lists all available commands for this bot.

* **Usage:**

  ```
  /commands
  ```
* **Result:** An embed message listing all commands and their descriptions, including a link to the full documentation.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://av0.gitbook.io/av/applications/multiloader-s2/discord-integration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
