diff --git a/.gitignore b/.gitignore index 74911c3..ef2296e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,81 +1,6 @@ package-lock.json - -# Logs -logs +logs/ *.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -# Runtime data -pids -*.pid -*.seed -*.pid.lock - -# Directory for instrumented libs generated by jscoverage/JSCover -lib-cov - -# Coverage directory used by tools like istanbul -coverage - -# nyc test coverage -.nyc_output - -# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) -.grunt - -# Bower dependency directory (https://bower.io/) -bower_components - -# node-waf configuration -.lock-wscript - -# Compiled binary addons (https://nodejs.org/api/addons.html) -build/Release - -# Dependency directories node_modules/ -jspm_packages/ - -# TypeScript v1 declaration files -typings/ - -# Optional npm cache directory -.npm - -# Optional eslint cache -.eslintcache - -# Optional REPL history -.node_repl_history - -# Output of 'npm pack' -*.tgz - -# Yarn Integrity file -.yarn-integrity - -# dotenv environment variables file -.env - -# parcel-bundler cache (https://parceljs.org/) -.cache - -# next.js build output -.next - -# nuxt.js build output -.nuxt - -# vuepress build output -.vuepress/dist - -# Serverless directories -.serverless - -# FuseBox cache -.fusebox/ config.json -./config.json diff --git a/handlers/logger.js b/handlers/logger.js index 549db1c..2820883 100644 --- a/handlers/logger.js +++ b/handlers/logger.js @@ -1,30 +1,35 @@ const leeks = require('leeks.js'); const now = new Date(); +const d = now.getDate(); const h = now.getHours(); const m = now.getMinutes(); const s = now.getSeconds(); let timestamp = `${h}:${('0' + m).slice(-2)}:${('0' + s).slice(-2)}`; +exports.init = x => { + console.log(`INIT FUNCTION TRIGGERED`) +}; + exports.basic = (m) => { console.log(m) }; exports.console = (m) => { - console.log(`[INFO | ${timestamp}] ${m}`) + console.log(`[INFO | ${timestamp}] ${m}`); }; exports.info = (m) => { - console.info(leeks.colours.cyan(`[INFO | ${timestamp}] ${m}`)) + console.info(leeks.colours.cyan(`[INFO | ${timestamp}] ${m}`)); }; exports.success = (m) => { - console.info(leeks.colours.green(`[INFO | ${timestamp}] ${m}`)) + console.info(leeks.colours.green(`[INFO | ${timestamp}] ${m}`)); }; exports.debug = (m) => { - console.info(leeks.colours.blueBright(`[DEBUG | ${timestamp}] ${m}`)) + console.info(leeks.colours.blueBright(`[DEBUG | ${timestamp}] ${m}`)); }; exports.warn = (m) => { - console.warn(leeks.colours.yellowBright(`[WARN | ${timestamp}] ${m}`)) + console.warn(leeks.colours.yellowBright(`[WARN | ${timestamp}] ${m}`)); }; exports.error = (m) => { - console.error(leeks.colours.red(`[ERROR | ${timestamp}] ${m}`)) + console.error(leeks.colours.red(`[ERROR | ${timestamp}] ${m}`)); }; diff --git a/index.js b/index.js index 1d56355..c4a505d 100644 --- a/index.js +++ b/index.js @@ -50,7 +50,7 @@ const cooldowns = new Discord.Collection(); const now = Date.now(); const commands = fs.readdirSync('./commands').filter(file => file.endsWith('.js')); - +log.init() log.basic(leeks.colours.magentaBright(` ######## #### ###### ###### ####### ######## ######## ## ## ## ## ## ## ## ## ## ## ## ## ##