Some of the handlers will be considered loaded when ignored.
This commit is contained in:
@@ -6,6 +6,7 @@ table.setHeading('Buttons', 'Status').setBorder('|', '-', '+', '+');
|
||||
|
||||
module.exports.name = 'buttons';
|
||||
module.exports = (client) => {
|
||||
if (!fs.existsSync('./buttons/')) return;
|
||||
fs.readdirSync('./buttons/').filter((file) => file.endsWith('.js')).forEach((file) => {
|
||||
const button = require(`../buttons/${file}`);
|
||||
client.buttons.set(button.id, button);
|
||||
|
||||
@@ -6,6 +6,7 @@ table.setHeading('Commands', 'Status').setBorder('|', '-', '+', '+');
|
||||
|
||||
module.exports.name = 'commands';
|
||||
module.exports = (client) => {
|
||||
if (!fs.existsSync(`./commands`)) return;
|
||||
fs.readdirSync('./commands/').forEach((dir) => {
|
||||
const files = fs.readdirSync(`./commands/${dir}`).filter((file) => file.endsWith('.js'));
|
||||
if (files.length <= 0) return;
|
||||
|
||||
@@ -14,6 +14,7 @@ const clientId = process.env.CLIENTID;
|
||||
const rest = new REST({ version: '9' }).setToken(token);
|
||||
module.exports.name = 'slashCommands';
|
||||
module.exports = async (client) => {
|
||||
if (!fs.existsSync(`./slashCommands`)) return;
|
||||
const slashCommands = [];
|
||||
|
||||
fs.readdirSync('./slashCommands/').forEach(async dir => {
|
||||
|
||||
Reference in New Issue
Block a user