discord.lux
v1.0.0
Published
A module with many features inside.
Downloads
3
Readme
💎 discord.lux
Thanks to this module, you can bring many features by a single module.
🔖 Table of contents
Installation
First install Node.JS. Then:
npm install discord.lux
Importing
// Using Node.js `require()`
const lux = require("discord.lux");
// Using ES6 imports
import lux from "discord.lux";
Usages (Click on it for more info on how to use it)
- luxDB - simple way to store data into mongodb
luxDB
1. Importing the package
const { luxDB } = require("discord.lux");
// or
import { luxDB } from "discord.lux";
2. Establishing and exporting luxDB
const db = new luxDB(client, {
uri: "your mongodb connection string",
});
module.exports = db;
3. Example on using it
const db = require("./db.js"); // replace db.js with your file path to the setup of luxDB
db.set("numbers", "123");
Methods
.set
// saves data to database
db.set("key", "value");
.get
// gets value from key
db.get("key"); // returns => value
.has
// returns boolean
db.has("key"); // returns => true
.delete
// deletes data
db.delete("key");
// checking for data
db.has("key"); // returns => false