add category array as global
This commit is contained in:
parent
3097e363d1
commit
2fed78ec04
1 changed files with 5 additions and 1 deletions
|
@ -5,7 +5,8 @@ const { CommandHandler, EventHandler } = require('./util/handlers');
|
|||
const Functions = require('./util/functions');
|
||||
const Database = require('./util/database');
|
||||
const logger = require('./util/logger');
|
||||
const sentry = require('@sentry/node'); // eslint-disable-line no-unused-vars
|
||||
const sentry = require('@sentry/node'); // eslint-disable-line no-unused-vars
|
||||
const { readdirSync } = require('fs');
|
||||
const config = require('../config.json');
|
||||
const pkg = require('../package.json');
|
||||
|
||||
|
@ -17,6 +18,7 @@ class WoomyClient extends Client {
|
|||
this.config = config;
|
||||
this.path = __dirname;
|
||||
this.version = pkg.version;
|
||||
this.categories = readdirSync('./commands/');
|
||||
|
||||
// dev mode, disables some features if enabled
|
||||
this.dev = false;
|
||||
|
@ -46,6 +48,8 @@ async function init () {
|
|||
|
||||
client.logger.info(`Initializing Woomy v${client.version}`);
|
||||
|
||||
require('./util/prototypes');
|
||||
|
||||
await client.commandHandler.loadAll();
|
||||
await client.eventHandler.loadAll();
|
||||
|
||||
|
|
Loading…
Reference in a new issue