2.0.5 • Published 6 years ago

discordframe-2 v2.0.5

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

Welcome to DiscordFrame 2

Hello to the New Reworked Honor Bot Framework

i Reworked Some things like:

1.) Client Setup 2.) Command Handler 3.) Command Setup

if You have any problems Contact me, or Publish it at The Issues page in GitHub. I have a schedule, Scroll to the Bottom!

  • Email ML2DOfficial@gmail.com

Why

I wanted to Rework HBF to be more featureful

Install

npm i discordframe-2

Usage

var discord = require('discordframe-2');
var ops = {} // Options getting passed through the handler

const bot = new discord.client({
    name: 'DSCBot',
    author: '<your_id>',
    prefix: 'dsc@',
    token: '<bot_token>',
    cmddir: require('path').join(__dirname+'./commands/');
});

bot.login();
bot.loadCommands(ops);

Example Command

Hello Command

// I recommend Raven / Sentry error logging

module.exports = {
    cfg: {
        name: 'hello',
        desc: 'says hello',
        usage: ''
    },

    process: async(bot, msg, args, ops) => {
        msg.channel.send(`Hello ${msg.member.mention}`);
    }
}

Features

  • frame.reqid(req, msg) Great for User specific commands
frame.reqid('<id_here>', msg).then(result => {
    if(result === false) {
        return;
        // a Embed will be sent and deleted after 6000ms
    } else {
        // CODE
    }
)};
  • frame.reqperm(req, msg) Great for Perm specific commmands
frame.reqperm('ADMINISTRATOR', msg).then(result => {
    if(result === false) {
        return;
        // a Embed will be sent and deleted after 6000ms
    } else {
        // CODE
    }
)};

Schedule

So I dont have a schedule for developing this Someday i will

2.0.5

6 years ago

2.0.4

6 years ago

2.0.3

6 years ago

2.0.2

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago