# Shop

{% hint style="success" %}

### Use the /points-parlor-ui command to set up a ui for users to buy shop items.

{% endhint %}

The Shop system allows server administrators to create and manage a store where users can purchase roles using the server's currency. The system supports various item types, stock management, and role requirements.

## <mark style="color:red;">Server Admin Setup</mark>

### Adding Items

```
/shop add-item <item_name> <item_price> <role_to_give> [role_to_have] [item_description] [item_stock] [item_image_url]
```

Parameters:

* `item_name`: Name of the item (1-100 characters)
* `item_price`: Price in server currency
* `role_to_give`: Role that users receive upon purchase
* `role_to_have`: (Optional) Required role to purchase the item
* `item_description`: (Optional) Description of the item (1-1500 characters)
* `item_stock`: (Optional) Limited stock quantity (default: unlimited)
* `item_image_url`: (Optional) Image URL for the item (.png, .jpg, or .gif)

Requirements:

* Bot must have "Manage Roles" permission
* Role to give must be below bot's highest role
* Item name must be unique

### **View Item Information**

```
/shop item-info <item_name>
```

* Shows detailed information about a specific item
* Displays name, description, price, stock, and role requirements

### **Edit Item**

```
/shop edit-item <item_name> [item_description] [item_price] [item_stock] [item_role_to_give] [item_role_to_have] [item_image_url]
```

* Modify any aspect of an existing item
* At least one parameter must be changed
* Same permission requirements as adding items

### **Delete Item**

```
/shop delete-item <item_name>
```

* Removes an item from the store
* Cannot be undone

### **View All Items**

```
/shop all-items
```

* Displays all items currently in the store
* Shows item details in an organized list

### Package Limitations

| Package Type | Maximum Items |
| ------------ | ------------- |
| Free         | 1             |
| Pro          | 5             |
| Enterprise   | 25            |

### Best Practices for Server Admins

1. **Role Hierarchy**
   * Ensure the bot's role is higher than any roles it needs to give
   * Test role assignments before making items public
2. **Item Management**
   * Use clear, descriptive item names
   * Set appropriate prices based on your economy
   * Consider using role requirements to create tiered access
   * Add images to make items more appealing
3. **Stock Management**
   * Use limited stock for exclusive or special items
   * Monitor stock levels regularly
   * Consider restocking popular items
4. **Security**
   * Regularly audit role permissions
   * Monitor purchase patterns for abuse
   * Keep the bot's role properly positioned in the hierarchy

### Important Notes

* All item names are case-sensitive
* Role requirements can be set to @everyone for universal access
* Stock can be set to unlimited by not specifying a quantity
* Image URLs must end with .png, .jpg, or .gif
* The bot must have "Manage Roles" permission to function
* Item edits cannot be undone
* Stock is automatically decremented upon purchase

### Troubleshooting

1. **Role Assignment Issues**
   * Check bot's role position in server settings
   * Verify bot has "Manage Roles" permission
   * Ensure role to give is below bot's highest role
2. **Item Not Found**
   * Verify exact item name (case-sensitive)
   * Check if item was deleted
   * Ensure item exists in current server
3. **Permission Errors**
   * Verify bot's permissions
   * Check role hierarchy
   * Ensure bot has necessary permissions in all relevant channels
