0.1.3 • Published 4 years ago

rubenn.db v0.1.3

Weekly downloads
5
License
MIT
Repository
-
Last release
4 years ago

A JSON database that allows users to interact with it easy

Current functions are:

.ensure(userid) basically prepares an ID for an user.

.get(userid) returns the value of given user id.

.inc(userid) increases the variable value of given user id by 1.

.add(userid, value) adds a value to the variable of given user id.

Change Log:

-Added .add(userid, value) and .inc(userid).

-Now if there something missing in the function it will return an error on the console.

Heres an example by using .ensure and .get functions:

const Discord = require('discord.js')
const client = new Discord.Client() 
client.on('message', message => {
if (message.content.startsWith("!total")) {
db.ensure(message.author.id)
let messages = db.get(message.author.id)
message.channel.send(`${message.author.username} you have ${messages} messages sent`) 
}});

rubenn.db is used for Discord.js, for beginners in Discord.js or without knowledge about Databases.

If you need any kind of help, join to our support server.

0.1.0

4 years ago

0.1.1

4 years ago

0.0.8

4 years ago

0.1.3

4 years ago

0.0.6

4 years ago

0.0.4

4 years ago

0.0.2

4 years ago