Skip to content

Cyberghxst/bdjs-db

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BDJS DB

A powerful plugin to bring BDJS local database support.

Setup

const { LocalStorage } = require('bdjs-db')
const { Bot } = require('bdjs')

const Database = new LocalStorage({
    tables: [{
        name: 'main',
        mod: 'main.json'
    }],
    mod: './database/',
    autoSave: true
})

Database.variables({
    message: 'hello world'
})

const bot = new Bot({
    ...
    plugins: [
        Database
    ]
})

Quick Setup

You can use the DefaultDataBaseOptions function to generate default database options

const { DefaultDataBaseOptions, LocalStorage } = require('bdjs-db')
const { Bot } = require('bdjs')

const Database = new LocalStorage(DefaultDataBaseOptions())

const bot = new Bot({
    ...
    plugins: [
        Database
    ]
})

About

A plugin to bring local database support to BDJS.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published