Skip to content

Commit

Permalink
fix: inline commands not registering properly
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiTenno committed Sep 16, 2018
1 parent 02b975c commit 4466e9b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/CommandManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class CommandManager {
* Loads the commands from disk into this.commands
*/
async loadCommands() {
if (!this.commands.length) {
if (!this.commands.length && !(this.commands[0] instanceof BaseCommand)) {
let files = fs.readdirSync(commandDir);

const categories = files.filter(f => f.indexOf('.js') === -1);
Expand Down Expand Up @@ -101,10 +101,10 @@ class CommandManager {
}).filter(c => c);

this.commands = commands.filter(c => !c.isInline);

this.inlineCommands = commands.filter(c => c.isInline);
}

this.inlineCommands = this.commands.filter(c => c.isInline);

await this.loadCustomCommands();
}

Expand Down

0 comments on commit 4466e9b

Please sign in to comment.