bdjs-db
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

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
    ]
})

Package Sidebar

Install

npm i bdjs-db

Weekly Downloads

0

Version

0.0.1

License

MIT

Unpacked Size

41.8 kB

Total Files

40

Last publish

Collaborators

  • cyberghxstuwu
  • asperion