1.0.2 ā¢ Published 26 days ago
@ronaldzav/local-storage v1.0.2
@ronaldzav/local-storage
š Local storage system for your discord bot
Installation
npm install @ronaldzav/local-storage
If you are using yarn:
yarn add @ronaldzav/local-storage
You can use the latest version of local-storage
setting this in your package.json:
"dependencies": {
"@ronaldzav/local-storage": "github:ronaldzav/local-storage"
}
Usage
const { Database } = require('@ronaldzav/local-storage');
let myFirstDB = new Database()
.setFolder('./storage')
.setName('guild-123')
.setDebug(true);
myFirstDB.data = { customdata: 'test' };
myFirstDB.save();
API
new Database()
setFolder(folder)
Set the folder where the database will be saved.
setName(name)
Set the name of the database.
setDebug(debug)
Set the debug mode.
METHODS
save()
Save the database.