mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-15 19:13:31 +01:00
Clean up Actions code (#591)
This commit is contained in:
committed by
Amish Shah
parent
432c5ccc82
commit
59a5862f2d
@@ -1,6 +1,5 @@
|
||||
const requireAction = name => require(`./${name}`);
|
||||
|
||||
class ActionsManager {
|
||||
|
||||
constructor(client) {
|
||||
this.client = client;
|
||||
|
||||
@@ -24,7 +23,7 @@ class ActionsManager {
|
||||
}
|
||||
|
||||
register(name) {
|
||||
const Action = requireAction(name);
|
||||
const Action = require(`./${name}`);
|
||||
this[name] = new Action(this.client);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user