A portion of my soul.
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
const fs = require('fs');
|
||||
const chalk = require('chalk');
|
||||
var AsciiTable = require('ascii-table');
|
||||
var table = new AsciiTable();
|
||||
table.setHeading('Handlers', 'Status').setBorder('|', '-', '+', '+');
|
||||
|
||||
module.exports.name = 'handlers';
|
||||
module.exports = (client) => {
|
||||
fs.readdirSync('./handlers/').filter((file) => file.endsWith('.js')).forEach((file) => {
|
||||
if (file === 'handlers.js') return;
|
||||
require(`./${file}`)(client);
|
||||
table.addRow(file.split('.js')[0], chalk.green('Loaded'));
|
||||
});
|
||||
console.log(chalk.magenta(table.toString()));
|
||||
};
|
||||
Reference in New Issue
Block a user