diff --git a/bot.js b/bot.js index 672c6b3..78152e3 100644 --- a/bot.js +++ b/bot.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: diff --git a/src/handle/startup/collect/commands.js b/src/handle/startup/collect/commands.js new file mode 100644 index 0000000..1231a23 --- /dev/null +++ b/src/handle/startup/collect/commands.js @@ -0,0 +1,5 @@ +const fs = require('fs'); + +module.exports = async client => { + +}; \ No newline at end of file diff --git a/src/handle/startup/collect/events.js b/src/handle/startup/collect/events.js new file mode 100644 index 0000000..39963e0 --- /dev/null +++ b/src/handle/startup/collect/events.js @@ -0,0 +1 @@ +module.exports = async client => {}; \ No newline at end of file diff --git a/src/handle/startup/run/collect.js b/src/handle/startup/run/collect.js index 06b9462..fdcc1a1 100644 --- a/src/handle/startup/run/collect.js +++ b/src/handle/startup/run/collect.js @@ -1 +1,8 @@ -module.exports = () => {}; \ No newline at end of file +const {Collection} = require("discord.js"); + +module.exports = async client => { + ['commands', 'events'].forEach(x => { + client[x] = new Collection(); + require(`../collect/${x}`)(client); + }); +}; \ No newline at end of file