# How to Setup ProdiGen

## **1. Setup Overview**

The setup process involves configuring products, categories, roles, channels, and permissions to enable seamless stock management.

**/setup Command**

This command is the core of ProdiGen’s configuration system. Use it to set up everything from products and categories to permissions and channel configurations.

**Basic Command:**

{% code overflow="wrap" %}

```
/setup <modif_type> <product> <category> <new_value> <description> <price> <role> <currency> <free_product_limit> <time_period> <channel_type> <id> <restock_alerts> <links> <emojis> <footer_name> <timezones> <theme_color>
```

{% endcode %}

***

## **2. Step-by-Step Setup Guide**

### **1. Product Setup**

The **/add\_product** command is designed to make product creation simple and flexible. With this command, you can specify key details such as the product name, price, category, and even automate the creation of multiple product variants using the **Product Type** option.

**Basic Command:**

{% code overflow="wrap" %}

```
/add_product name:<Product Name> price:<Product Price> [category:<Category Name>] [product_type:<Product Type>]
```

{% endcode %}

**Parameters Explained:**

1. **Name**:
   * The `name` parameter defines the product's name. This is required and will be the label for your product in your system.
2. **Price**:
   * The `price` option sets the price of your product. You can input a single value for a standalone product (e.g., `price:5`), or multiple values separated by slashes (e.g., `price:5/15/25/35`) to define different prices for product variants or durations.
3. **Category (Optional)**:

   * The `category` option allows you to group your products into predefined categories. If this option is used, the product will automatically be added to the specified category.
   * Example with category:

   ```
   /add_product name:VPN_PRO category:VPNs price:10
   ```

   * If the category is omitted, the product will not belong to any specific group, but will still be added to your system:

   ```
   /add_product name:VPN_PRO price:10
   ```
4. **Product Type (Optional)**:

   * The `product_type` option lets you automatically generate multiple versions of a product based on predefined templates, such as different time durations or access levels.
   * Example with the "Tool" product type:

   ```
   /add_product name:VPN_PRO price:5/15/25/35 category:VPNs product_type:Tool
   ```

**Explanation**:

* When the "Tool" product type is selected, the bot will automatically create four versions of the product with suffixes **DAY**, **WEEK**, **MONTH**, and **LIFETIME**. These correspond to default time-based durations for tool-type products.
* You can assign prices to each version by entering multiple values in the price option (e.g., `5/15/25/35`). If only one price is given, it will be applied to all versions.

**Example**:

* `VPN_PRO_DAY` priced at $5, `VPN_PRO_WEEK` at $15, `VPN_PRO_MONTH` at $25, and `VPN_PRO_LIFETIME` at $35.

***

### **2. Category Setup**

To organize your products, use the following command to create categories:

**Basic Command:**

```
/setup modif_type:category category:<Category Name> new_value:<Product Name>
```

**Parameters Explained:**

* **category** (String): Name of the category to create or modify.
* **new\_value** (String): Name of the product to associate with this category.

**Example Command:**

```
/setup modif_type:category category:VPNs new_value:VPN_PRO
```

### **3. Role and Permissions Setup**

You can assign roles with specific permissions to manage stock and transactions.

**Basic Command:**

{% code overflow="wrap" %}

```
/setup modif_type:roles role:<Role> free_product_limit:<Limit> time_period:<Time Period>
```

{% endcode %}

**Parameters Explained:**

* **role** (Role): The Discord role you wish to modify.
* **free\_product\_limit** (Integer): The limit of free products a role can generate in a set time period.
* **time\_period** (Choice): Time period for the free product limit, can be minute, hour, day, week, or month.

**Example Command:**

```
/setup modif_type:roles role:@Admin free_product_limit:5 time_period:day
```

**Result:** Admins can generate up to 5 free products per day.

### **4. Channel Setup**

To define where specific bot actions (like stock generation, logs, etc.) will take place, use the following command:

**Basic Command:**

```
/setup modif_type:channels channel_type:<Channel Type> id:<Channel ID>
```

**Parameters Explained:**

* **channel\_type** (Choice): Type of the channel to configure (gen\_channel\_id, logs\_channel\_id, restock\_alerts\_channel\_id).
* **id** (Integer): The channel ID where these actions will happen.

**Example Command:**

```
/setup modif_type:channels channel_type:logs_channel_id id:123456789012345678
```

**Result:** Logs will now be sent to the specified channel.

***

## **3. Other Setup Options**

* **Currencies**: Set the currency used in your bot using `/setup modif_type:gen_settings currency:<€/$>`.
* **Restock Alerts**: Enable or disable restock alerts with `/setup modif_type:gen_settings restock_alerts:enabled`.
* **Guild ID**: Configure the main guild by using `/setup modif_type:guild id:<YourGuildID>`.

***

## **4. Important Commands for Admins**

**`/gen_perms`**

Displays all the permissions that have been set for each role in your server. You can see who has permission to generate stock, add balance, and more.

**`/add_stock_file`**

Allows admins to add stock from a file. This is particularly useful when you have a large number of product keys to add.

**Command Example:**

```
/add_stock_file product:<Product Name> attachment:<Stock File>
```

**`/recent_transactions`**

Shows the most recent transactions, giving you visibility over the stock movement and key generation.


---

# 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/bots/prodigen/how-to-setup-prodigen.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.
