1.2.1 • Published 4 years ago

edith-db v1.2.1

Weekly downloads
2
License
BSD-3-Clause
Repository
github
Last release
4 years ago

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);
1.2.1

4 years ago

1.2.0

4 years ago

1.1.9

4 years ago

1.1.8

4 years ago

1.1.7

4 years ago

1.1.6

4 years ago

1.1.5

4 years ago

1.1.4

4 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

5 years ago

1.0.0

5 years ago