official dumbily moment
This commit is contained in:
parent
e345077f9c
commit
728e420802
1 changed files with 2 additions and 2 deletions
|
@ -41,7 +41,7 @@ class WoomyClient extends Eris.Client {
|
||||||
|
|
||||||
for (const file of this.commandFiles) {
|
for (const file of this.commandFiles) {
|
||||||
try {
|
try {
|
||||||
const props = require(this.path + '/commands/' + file)(this);
|
const props = new (require(this.path + '/commands/' + file))(this);
|
||||||
props.help.name = nameRegexp.exec(file);
|
props.help.name = nameRegexp.exec(file);
|
||||||
props.help.category = catRegexp.exec(file);
|
props.help.category = catRegexp.exec(file);
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ class WoomyClient extends Eris.Client {
|
||||||
|
|
||||||
for (const file of this.eventFiles) {
|
for (const file of this.eventFiles) {
|
||||||
try {
|
try {
|
||||||
const event = new (require(this.path + '/event_modules/' + file)(catRegexp.exec(file)));
|
const event = new (require(this.path + '/event_modules/' + file))(catRegexp.exec(file));
|
||||||
this.eventModules.set(nameRegexp.exec(file), event);
|
this.eventModules.set(nameRegexp.exec(file), event);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.logger.error('EVENT_LOADER_ERROR', `Failed to load ${file}: ${error}`);
|
this.logger.error('EVENT_LOADER_ERROR', `Failed to load ${file}: ${error}`);
|
||||||
|
|
Loading…
Reference in a new issue