Product Panel

πŸ”§ Installation

  1. Copy the absolet-product folder into the addons/ directory inside your bot's src/ folder.

    If the addons/ directory does not exist, create it manually.

  2. Add ProductPanel to commands.yml file of the bot

ProductPanel:
  Enabled: true
  Permissions:
    - "Admin" 

βœ… Verification

Once installed and loaded properly, the bot should display the following message in the console:

The product panel addon has been loaded

This confirms that the add-on was detected and registered successfully.


βš™οΈ Add-on Configuration: Product Panel System

This configuration file defines settings for a product panel add-on used within Absolet bot. It enables creating rich embed panels with downloadable items, access roles, cooldowns, and logging.


πŸ“ Structure

panels:
  PanelName:
    title: "Panel Title"
    description:
      - "Line 1"
      - "Line 2"
    Footer: "Footer Text"
    ThumbnailURL: "https://example.com/thumbnail.png"
    AuthorURL: "https://example.com"
    AuthorName: "Author Name"
    FooterURL: "https://example.com/footer.png"
    embedColor: "#E74C3C"
    useButtons: true
    cooldownDuration: 60
    products: 
      - name: "Product Name"
        emoji: "πŸ“¦"
        description: "Product description"
        roleNames: ["Admin", "Buyers"]
        roleIds: ["role-id"]
        zipFilePath: "/path/to/file.zip"
        buttonLabel: "Download Label"
        buttonColor: "SECONDARY"

🧩 Panel Options

Field
Type
Description

title

string

Embed title.

description

list

Lines of descriptive text.

Footer

string

Footer text shown in the embed.

ThumbnailURL

string

Thumbnail image URL.

AuthorURL

string

Hyperlink on author name.

AuthorName

string

Author name text.

FooterURL

string

Icon for the embed footer.

embedColor

string

Hex code for the embed border color.

useButtons

boolean

If true shows button-based product selection, else shows dropdown menu

products

list

List of downloadable products (see below).

cooldownDuration

int

Cooldown time (in seconds) per user per product.


πŸ“¦ Product Options

Each panel may have multiple products:

Field
Type
Description

name

string

Name shown to users.

emoji

string

Emoji prefix.

description

string

Brief summary of the product.

roleIds

list

Role that can download (e.g., @everyone for public).

roleNames

list

Roles that can download (e.g., @everyone for public).

zipFilePath

string

Path to the folder where your .zip file is located inside products folder. For example if you have a file called standard.zip inside /addons/absolet-product/products/your-product-name, the zipFilePath should be your-product-name. Note that there is no mentioning of standard.zip. It is because the bot addon checks that if there is only one zip file in the folder, then it automatically sends that file. But if there are more files in the same folder, the addon compresses the folder and then sends the compressed file to chat. The recommended way of adding products is: for every product, create it's own folder. Even if it is the same product but has different types of releases. For example for product with Standard and Full releases, the recommended file location is addons/absolet-product/products/your-product-name/standard/standard.zip and addons/absolet-product/products/your-product-name/full/full.zip. The zipFilePath for these two will be your-product-name/standard/ and your-product-name/full/ respectively

buttonLabel

string

Text on the download button.

buttonColor

string

Button style (PRIMARY, SECONDARY, SUCCESS, DANGER or hex string).


πŸ’¬ Replies

Bot response messages can be customized under the replies section:

replies:
  noPanel: "Panel configuration for \"{panel}\" not found."
  panelPosted: "Panel Posted."
  failedPanelDisplay: "Failed to display panel."
  noSuchProduct: "Product not found."
  noRequiredRole: "You do not have the required role to download this product."
  cooldownMessage: "Please wait for cooldown. You can download the product again in {time-remaining}."
  downloadReady: "Here is your download:"
  downloadError: "Error preparing the download, please try again later."

DropdownMenu:
  placeholder: "Choose a product"

Set the placeholder text for product selection dropdowns (if buttons are not used).


🧾 Download Logging

To enable logging of downloads, provide a channel ID and configure the embed:

LogChannel:
  ID: "123456789012345678" # Leave blank to disable logging
  Embed:
    Title: "πŸ“₯ New Download Notification"
    Description:
      - "πŸ“Œ **User:** {user}"
      - "πŸ“¦ **Product:** {product}"
      - "⏰ **Downloaded at:** {time}"
      - "πŸ”’ **Total Downloads:** {downloads}"
    Footer:
      Text: "Your Project or Bot Name"
      Icon: "https://example.com/footer.png"
    Author:
      Text: "Download Tracker"
      Icon: "https://example.com/author.png"
    Color: "#E74C3C"
    Image: "https://your.image.url/banner.png"
    Thumbnail: ""

Best Practices

  • Ensure all file paths exist and are accessible by the bot.

  • Use unique panel names to avoid conflicts.

Last updated