sync loaders

v2
Kit Kasune 2 years ago
parent cb0d1d8622
commit df49abf989
  1. 2
      bot.js
  2. 5
      src/handle/startup/collect/commands.js
  3. 1
      src/handle/startup/collect/events.js
  4. 9
      src/handle/startup/run/collect.js

@ -27,6 +27,8 @@ const startBot = async () => {
await require('./src/handle/startup/run/login')(client); //log in to discord
await require('./src/db/connect')(client); //connect to database
await require('./src/handle/startup/run/collect')(client);
};
startBot().catch(e => errorhandler(e)); // TODO add a .catch() and flag to recover the process
// feels like there isn't a function name to do this justice :joy:

@ -0,0 +1,5 @@
const fs = require('fs');
module.exports = async client => {
};

@ -0,0 +1 @@
module.exports = async client => {};

@ -1 +1,8 @@
module.exports = () => {};
const {Collection} = require("discord.js");
module.exports = async client => {
['commands', 'events'].forEach(x => {
client[x] = new Collection();
require(`../collect/${x}`)(client);
});
};
Loading…
Cancel
Save