1.5.1 • Published 2 years ago
mangoodb v1.5.1
Information
mangoodb is a module that simplifies mongo db functions and offers easier use
Installation
yarn add mangoodb
# Via npm
npm install mangoodb
Updates
quick fix sry
Usage
const { DataLake } = require("mangoodb");
const db = new DataLake("Collection Name", "Your Mongo URL");
// most used methods
function YourFunction() {
// data fetch
db.get({
memberID: message.author.id,
});
// data update aka add
db.update(
{ guildID: message.guild.id, memberID: message.author.id },
{ $inc: { rank: 1 } },
{ upsert: true }
);
// data delete
db.delete({
memberID: message.author.id,
});
}
// call your function
YourFunction();