mirror of
https://github.com/ChomeNS/chomens-bot-mc.git
synced 2024-11-27 09:35:35 -05:00
auto reload commads
This commit is contained in:
parent
c76b9a0b29
commit
4fa5dc50c0
1 changed files with 5 additions and 1 deletions
|
@ -5,8 +5,12 @@ const loadFiles = require('../util/load_files');
|
|||
const path = require('path');
|
||||
const {MessageEmbed} = require('discord.js');
|
||||
function inject(bot, dcclient) {
|
||||
bot.command_handler.commands = loadFiles(path.join(__dirname, '../commands'));
|
||||
function reload() {
|
||||
bot.command_handler.commands = loadFiles(path.join(__dirname, '../commands'));
|
||||
}
|
||||
reload();
|
||||
bot.command_handler.main = function(prefix, username, usernameraw, message, sender, channeldc) {
|
||||
reload();
|
||||
let raw;
|
||||
let command;
|
||||
if (typeof message.content!=='undefined') raw = message.content.substring(prefix.length);
|
||||
|
|
Loading…
Reference in a new issue