bhbl.db

1.0.2 • Public • Published

bhbl.db

Join our discord
Support: https://bhbotlist.xyz/dc
NPM: npmjs.com/package/bhbl.db

const Database = require("bhbl.db");
const db = new Database("./db.json");

db.set('serverStatus', { status: 'Online' })
/*
"serverStatus": {
  "status": "Online"
}
*/
db.add("money_bhbl", 500)
/* 
  "money_bhbl": 500
*/
db.push("serverSettings", { whitelist: "on", playerCount: "24" })
/*
"serverSettings": [
    {
      "whitelist": "on",
      "playerCount": "24"
    }
  ]
*/
db.has("money_bhbl") // true
db.has("money_ibhbl") // false

db.get("money_bhbl")
// => 500

db.sub("money_bhbl", 100)
// => 400

db.fetch("serverStatus")
// => { status: "Online" }

db.get("serverStatus")
// => { status: "Online" }

db.delete("serverStatus")
// => {}

db.all()
/*
{
  money_bhbl: 500,
  serverSettings: [ { whitelist: 'on', playerCount: '24' } ]
}
*/

db.clear()
// {}

Installation

If you have trouble with the installation, please feel free to visit our discord address.

  • npm i bhbl.db

Package Sidebar

Install

npm i bhbl.db

Weekly Downloads

1

Version

1.0.2

License

MIT

Unpacked Size

3.39 kB

Total Files

3

Last publish

Collaborators

  • bhbotlist