This commit is contained in:
Isaac
2021-02-17 13:24:33 +00:00
parent 4c8e9125e5
commit ce2942879c
9 changed files with 121 additions and 63 deletions

View File

@@ -7,6 +7,7 @@ module.exports = client => {
for (const file of files) {
const listener = require(`../listeners/${file}`);
client.on(listener.event, (...args) => listener.execute(client, ...args));
let on = listener.once ? 'once' : 'on';
client[on](listener.event, (...args) => listener.execute(client, ...args));
}
};

View File

@@ -1,4 +1,4 @@
module.exports = async client => {
module.exports = client => {
client.config.plugins.forEach(plugin => {
try {
let package = require(`${plugin}/package.json`);