Discord Dashboard
Optional Configuration
Form Types
Required Configuration
Dashboard Settings
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;
}
},
]
},
],
});
Props
Unique ID of the category
The Name that should be displayed
URL to an image to be shown
If the category should be toggleable
Short description of the category to be shown on the page
The options that should be included
Was this page helpful?
On this page
Assistant
Responses are generated using AI and may contain mistakes.