1.0.2 • Published 4 years ago

lxrsv1 v1.0.2

Weekly downloads
-
License
ISC
Repository
-
Last release
4 years ago

LxrsV1

Syntax

- Set your commands dir (discord)

| Not advanced (only one folder)

// importing the package
const lxrsv1 = require('lxrsv1');

lxrsv1.setCommandsDirNotAdvanced('<your commands folder>').forEach((file) => {
    // do stuff with the files
})

| Advanced (multiple subfolders)

const lxrsv1 = require('lxrsv1');

lxrsv1.setCommandsDirAdvanced('<your commands folder>').forEach((file) => {
    // do stuff with all files
    // format you'll get back: 
    // [['filename', 'subfolder'], ['filename', 'subfolder']])
})

Examples:

- Set your commands dir (discord)

// Advanced and not advanced have the same syntax so it shouldn't matter
const {setCommandsDirNotAdvanced} = require('lxrsv1')

setCommandsDirNotAdvanced('commands').forEach((file) => {
    console.log(file)
})

// My files:
//  index.js
//  commands
//  | <all my command files (for example: kick.js)>