require('dotenv').config(); // Require and run dotenv // Import modules const Discord = require('discord.js'); const Enmap = require('enmap'); const client = new Discord.Client({partials: ["REACTION", "MESSAGE"]}); // Use log75 for logging const { default: Log75, LogLevel } = require('log75') const logger = new Log75(process.env.NODE_ENV == 'production' ? LogLevel.Standard : LogLevel.Debug, true); module.exports = { client: client, logger: logger } // Execute modules in util folder in order async function runModules() { for (const file of ['commandLoader', 'login', 'eventHandler', 'karma']) { logger.debug(`Running module ${file}`); await require(`./util/${file}`).run(); } } runModules();