diff --git a/config/ranks.js b/config/ranks.js index 2119858..fa40fcd 100644 --- a/config/ranks.js +++ b/config/ranks.js @@ -10,6 +10,7 @@ module.exports = { 'TWITCH', 'YOUTUBE', 'BUILDER', + 'MAPPER', 'MAPLEAD', 'MEDIA', 'TRAINEE', @@ -27,6 +28,7 @@ module.exports = { 'NONE' : 'PLAYER', 'ALL' : 'PLAYER', + 'MOOTUBE' : 'YT', 'YOUTUBESMALL' : 'YT', 'MAPDEV' : 'BUILDER', diff --git a/index.js b/index.js index 3716c65..1539bec 100644 --- a/index.js +++ b/index.js @@ -1,3 +1,3 @@ -require('./lib/Prototypes'); +require('./lib/defs'); module.exports = require(`./lib/MineplexAPIWrapper`); \ No newline at end of file diff --git a/lib/Prototypes.js b/lib/defs.js similarity index 84% rename from lib/Prototypes.js rename to lib/defs.js index c806a50..6d77981 100644 --- a/lib/Prototypes.js +++ b/lib/defs.js @@ -50,25 +50,25 @@ String.prototype.toChalkFormatting = function () { }; Boolean.prototype.toOnlineString = function () { - return (this) ? 'online' : 'offline'; + return (this === true) ? 'online' : 'offline'; }; Boolean.prototype.toActiveString = function () { - return (this) ? 'active' : 'inactive'; + return (this === true) ? 'active' : 'inactive'; }; -Number.prototype.toHumanReadable = function () { +Number.prototype.toHumanReadable = function (fix = 1) { let days, hours, minutes, seconds = this; if(seconds <= 60) return `${seconds} seconds`; - minutes = (seconds / 60).toFixed(1); + minutes = (seconds / 60).toFixed(fix); if(minutes <= 60) return `${minutes} minutes`; - hours = (minutes / 60 ).toFixed(1); + hours = (minutes / 60 ).toFixed(fix); if(hours <= 60) return `${hours} hours`; - return `${(hours/24).toFixed(1)} days`; + return `${(hours/24).toFixed(fix)} days`; }; \ No newline at end of file