Add some comments
parent
145a3bee15
commit
041c3fe855
13
index.js
13
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}`);
|
||||
|
||||
|
|
Loading…
Reference in New Issue