diff --git a/index.js b/index.js index 4379262..8cbeb44 100644 --- a/index.js +++ b/index.js @@ -38,6 +38,10 @@ function saveBlocked() { fs.writeFileSync(blockFile, JSON.stringify(blocked, null, 4)); } +/* + * MODMAIL LOG UTILITY FUNCTIONS + */ + function getLogFileInfo(logfile) { const match = logfile.match(logFileFormatRegex); if (! match) return null; @@ -104,6 +108,10 @@ function findLogFilesByUserId(userId) { }); } +/* + * MAIN FUNCTIONALITY + */ + bot.on('ready', () => { modMailGuild = bot.guilds.find(g => g.id === config.mailGuildId); @@ -319,7 +327,10 @@ bot.registerCommand('logs', (msg, args) => { bot.connect(); -// Server for serving logs +/* + * MODMAIL LOG SERVER + */ + const server = http.createServer((req, res) => { const parsedUrl = url.parse(`http://${req.url}`);