-
Notifications
You must be signed in to change notification settings - Fork 44
Open
Description
This is my code:
const fs = require('mz/fs');
const modules = []
client.on("ready", async () => {
console.log("Logged in to discord!");
client.user.setGame("!help")
// start loading modules
const files = await fs.readdir("./modules").catch(e => {
console.error("Module directory could not be found, aborting", argv.debug ? `\n${error}` : "")
process.exit( 1 )
})
for(const file of files) {
// Make one pass and make the file complete
const stat = await fs.stat(`./modules/${file}`).catch(e => {
console.error("Error stating file.", argv.debug ? `\n${e}` : "")
})
if(stat.isDirectory()) {
return
}
debug(`Loaded ./modules/${file}`)
const mod = require(`./modules/${file}`)
mod.init(client)
modules.push(mod)
};
console.log(`Bot started successfully, ${modules.length} modules loaded`)
});it never gets to even print the last console.log, no matter how long I leave it to run
Metadata
Metadata
Assignees
Labels
No labels