Dashboard settings are simply a complex list of options that the user will be able to change in it. Our module allows the user to divide settings into categories, so this list should contain a category object. The category object itself also contains a list of settings for the category.

new DBD.Dashboard({
  settings: [categoryObject, categoryObject],
});

See more about categories and options

Example Usage

new DBD.Dashboard({
  settings: [
    {
        categoryId: 'input',
        categoryName: 'New Category',
        categoryImageURL: 'URL To image',
        categoryDescription: "Setup your bot with default settings!"
        toggleable: true,
        getActualSet: async ({ guild }) => {
          return settings['toggleeco'];
        },
        setNew: async ({ guild, newData }) => {
          settings['toggleeco'] = newData;
        },
        categoryOptionsList: [
            {
                optionId: 'prefix',
                optionName: "Prefix",
                optionDescription: "Set bot prefix.",
                optionType: DBD.formTypes.input('Prefix', 1, 4, false, false),
                getActualSet: async ({guild}) => {
                    // You will need to create your own query logic here. We use a variable as example!
                    return prefixData[guild.id] || '!';
                },
                setNew: async ({guild,newData}) => {
                    // You will need to create your own save logic here. We use a variable as example!
                    prefixData[guild.id] = newData || '!';
                    return;
                }
            },
        ]
    },
  ],
});
settings
categoryObject[]
required

An array of category objects.