1.1.16 • Published 3 years ago

nisus v1.1.16

Weekly downloads
627
License
ISC
Repository
-
Last release
3 years ago

Insanely easy to use but advanced discord.js command handler

Installation

npm i nisus

Setup

const Discord = require('discord.js');
const nisus = require('nisus');
const client = new Discord.Client();

new nisus(client, {
    commandsFolder: './commands', // commands folder 
    eventsFolder: './events', // events folder
    token: 'Your Super Secret Token', // your discord bot token
    prefix: 'Bot Prefix', // your bot prefix
    owners: [''], // array of the bot owners,
    mongoURI: '' // your mongodb connection string (optional)
})

Command layout

module.exports = {
    name: '', // command name | type: String
    aliases: [], // command aliases | type: Array
    ownerOnly: false, // exclusive to owner only | type: Boolean
    guildOnly: false, // exclusive to guild only (cannot be used in DMs) | type: Boolean
    nsfw: false, // command can only be used in NSFW channels | type: Boolean
    disabled: false, // disables/enables the command to be used | type: Boolean
    userPerms: [], // user required permissions | type: Array
    botPerms: [], // bot required permissions | type: Array
    requiredRoles: [], // user required roles | type: Array
    requiredChannel: '', // only channel where the command can be used | type: String
    callback: (message, args, client) => {
        /*
         Your code here
        */
    }
}

Example Command

// example command: ping command

module.exports = {
    name: 'ping',
    aliases: ['p'],
    ownerOnly: false,
    guildOnly: false,
    nsfw: false,
    disabled: false,
    callback: (message, args, client) => {
        message.channel.send('Pong!')
    }
}

Events layout

// file name = event name, eg: file name is message.js which means its a message event

module.exports = (client, <EVENT PARAMS>) => {
        /*
            Your code here
        */
}

Example event

// message event 
module.exports = (client, message) => {
    console.log(message.content)
}

1.1.16

3 years ago

1.1.15

3 years ago

1.1.14

3 years ago

1.1.12

3 years ago

1.1.13

3 years ago

1.1.11

3 years ago

1.1.10

3 years ago

1.1.9

3 years ago

1.1.8

3 years ago

1.1.7

3 years ago

1.1.6

3 years ago

1.1.5

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago