edith-db
v1.2.1
Published
Discord JSON leveling system :3
Downloads
4
Readme
Edith Database
json database made to help you make a discord leveling system
Installation
Use the package manager npm to install edith-db.
npm install edith-db
Make a json file called "database.json" in the root directory
Usage
/**
* @param {string} [userID] - User's Discord Id
* @param {integer} [toSet] - How much xp/level/currency you want to set to the user
* @param {integer} [toAdd] - How much xp/level/currency you want to add to the user
*/
var edithdb = require('edith-db');
// Erase old xp/level/currency and replace it with new information
edithdb.setXp(userID, toSet);
edithdb.setLevel(userID, toSet);
edithdb.setCurrency(userID, toSet);
// Add onto the old xp/level/currency
edithdb.addXp(userID, toAdd);
edithdb.addLevel(userID, toAdd);
edithdb.addCurrency(userID, toAdd);
// Remove from the user's xp
edithdb.subtractXp(UserID, toAdd);
edithdb.subtractLevel(UserID, toAdd);
edithdb.subtractCurrency(UserID, toAdd);