dbd-settings-handler

1.0.0 • Public • Published

Discord Dashboard Settings Handler

Requires discord dashboard

An easy to use handler for discord dashboard, it allows you to quickly add new settings without having to worry about setting up a database that uses keyv to make sure it supports any database you are looking for!

Usage

const { Category, Option, init } = require('dbd-settings-handler')

init(); // Uses sqlite by default, accepts string of a keyv adapter

// DBD Config...
{
    settings: [
        new Category()
            .setId('setup') // Sets the id of the category - must be unique
            .setName("Setup") // Name of the category
            .setDescription("Setup your bot with default settings!") // Description of the category
            .addOptions(
                new Option() // Creates a new option inside the category
                .setId('lang') // Sets the id of the option - must be unique
                .setName("Language") // Name of the option
                .setDescription("Change bot's language easily") // Description of the option
                .setType(DBD.formTypes.select({"Polish": 'pl', "English": 'en', "French": 'fr'})), // The DBD form type function

                new Option()
                .setId('join_message')
                .setName("Join Message")
                .setDescription("Is the join message enabled?")
                .setType(DBD.formTypes.switch(false))
            )
    ]
}

Support / Help

Join the DBD creators discord:

Discord server

Package Sidebar

Install

npm i dbd-settings-handler

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

7.5 kB

Total Files

8

Last publish

Collaborators

  • exzotic