This commit is contained in:
Dragon Fire
2021-06-05 12:31:10 -04:00
parent 7917766ce3
commit 8809dee34c
19 changed files with 82 additions and 83 deletions
+4 -4
View File
@@ -28,8 +28,8 @@ module.exports = class Registry {
const commands = fs.readdirSync(path.join(dir, group));
for (const command of commands) {
if (!command.endsWith('.js')) continue;
const required = require(path.join(dir, group, command));
this.registerCommand(new required(this.client));
const Required = require(path.join(dir, group, command));
this.registerCommand(new Required(this.client));
}
}
return this;
@@ -62,8 +62,8 @@ module.exports = class Registry {
const types = fs.readdirSync(dir);
for (const type of types) {
if (!type.endsWith('.js')) continue;
const required = require(path.join(dir, type));
this.registerType(new required(this.client));
const Required = require(path.join(dir, type));
this.registerType(new Required(this.client));
}
return this;
}