discord.lux

1.0.0 • Public • Published

💎 discord.lux

Thanks to this module, you can bring many features by a single module.

NPM info


🔖 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

Readme

Keywords

none

Package Sidebar

Install

npm i discord.lux

Weekly Downloads

2

Version

1.0.0

License

ISC

Unpacked Size

5.86 kB

Total Files

5

Last publish

Collaborators

  • spencerreid