mirror of
https://github.com/ChomeNS/chomens-bot-mc.git
synced 2024-11-14 18:54:55 -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 path = require('path');
|
||||||
const {MessageEmbed} = require('discord.js');
|
const {MessageEmbed} = require('discord.js');
|
||||||
function inject(bot, dcclient) {
|
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) {
|
bot.command_handler.main = function(prefix, username, usernameraw, message, sender, channeldc) {
|
||||||
|
reload();
|
||||||
let raw;
|
let raw;
|
||||||
let command;
|
let command;
|
||||||
if (typeof message.content!=='undefined') raw = message.content.substring(prefix.length);
|
if (typeof message.content!=='undefined') raw = message.content.substring(prefix.length);
|
||||||
|
|
Loading…
Reference in a new issue