> ## Documentation Index
> Fetch the complete documentation index at: https://docs.assistantscenter.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Categories

## What are Categories?

Discord-Dashboard allows you to create a two-tier system of options because you can divide them into categories. Therefore, all you need to do in the config Dashboard is to place a category object in the Array and Option objects for that option category in the Array.

## What does Category Object looks like

```javascript CategoryObject theme={null}
{
    categoryId: 'unique_id',
    categoryName: "Category Name",
    categoryDescription: "Category Description",
    categoryOptionsList: [
        categoryOptionObject,
        categoryOptionObject,
    ]
}
```

| Option              | Type   | Description                                                          |
| ------------------- | ------ | -------------------------------------------------------------------- |
| categoryId          | String | Category ID (must be lowercase and unique).                          |
| categoryName        | String | Category name. Can include HTML code.                                |
| categoryDescription | String | Category description. Can include HTML code.                         |
| categoryOptionsList | Array  | An Array of the [categoryOptionObject](/essentials/options) Objects. |

## Other categories

### Toggleable

```javascript CategoryObject theme={null}
{
    categoryId: 'input',
    categoryName: 'New Category',
    categoryImageURL: 'URL To image',
    categoryDescription: "Setup your bot with default settings!",
    /* Heres the magical code! This is all you need to add to make it work */
    toggleable: true,
    getActualSet: async ({ guild }) => {
        return settings['toggleeco'];
    },
    setNew: async ({ guild, newData }) => {
        settings['toggleeco'] = newData;
    },
    /* End of magical code! */
    categoryOptionsList: [
        categoryOptionObject,
        categoryOptionObject,
    ]
}
```

<Info>
  When using this you do not need to add the getActualSet and setNew functions
  to the [categoryOptionObject](/essentials/options)
</Info>

### Refresh on save

```javascript CategoryObject theme={null}
{
    categoryId: 'input',
    categoryName: `New Category`,
    categoryImageURL: 'URL To image',
    categoryDescription: "Setup your bot with default settings!",
    /* Heres the magical code! This is all you need to add to make it work */
    refreshOnSave: true,
    /* End of magical code! */
    categoryOptionsList: [
        categoryOptionObject,
        categoryOptionObject,
    ]
}
```
