diff --git a/package-lock.json b/package-lock.json index ab2620f..e301c84 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,7 +17,10 @@ "colors": "^1.4.0", "discord.js": "^13.3.1", "node-fetch": "^2.6.1", + "node-os-utils": "^1.3.6", "node-vibrant": "^3.2.1-alpha.1", + "os": "^0.1.2", + "os-utils": "^0.0.14", "sequelize": "^6.7.0", "sqlite": "^4.0.23", "sqlite3": "^5.0.2" @@ -1640,6 +1643,11 @@ "inherits": "2" } }, + "node_modules/node-os-utils": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/node-os-utils/-/node-os-utils-1.3.6.tgz", + "integrity": "sha512-WympE9ELtdOzNak/rAuuIV5DwvX/PTJtN0LjyWeGyTTR2Kt0sY56ldLoGbVBnfM1dz46VeO3sHcNZI5BZ+EB+w==" + }, "node_modules/node-pre-gyp": { "version": "0.11.0", "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.11.0.tgz", @@ -1879,6 +1887,11 @@ "wrappy": "1" } }, + "node_modules/os": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/os/-/os-0.1.2.tgz", + "integrity": "sha512-ZoXJkvAnljwvc56MbvhtKVWmSkzV712k42Is2mA0+0KTSRakq5XXuXpjZjgAt9ctzl51ojhQWakQQpmOvXWfjQ==" + }, "node_modules/os-homedir": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", @@ -1895,6 +1908,14 @@ "node": ">=0.10.0" } }, + "node_modules/os-utils": { + "version": "0.0.14", + "resolved": "https://registry.npmjs.org/os-utils/-/os-utils-0.0.14.tgz", + "integrity": "sha1-KeURaXsZgrjGJ3Ihdf45eX72QVY=", + "engines": { + "node": "*" + } + }, "node_modules/osenv": { "version": "0.1.5", "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", @@ -3977,6 +3998,11 @@ } } }, + "node-os-utils": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/node-os-utils/-/node-os-utils-1.3.6.tgz", + "integrity": "sha512-WympE9ELtdOzNak/rAuuIV5DwvX/PTJtN0LjyWeGyTTR2Kt0sY56ldLoGbVBnfM1dz46VeO3sHcNZI5BZ+EB+w==" + }, "node-pre-gyp": { "version": "0.11.0", "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.11.0.tgz", @@ -4172,6 +4198,11 @@ "wrappy": "1" } }, + "os": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/os/-/os-0.1.2.tgz", + "integrity": "sha512-ZoXJkvAnljwvc56MbvhtKVWmSkzV712k42Is2mA0+0KTSRakq5XXuXpjZjgAt9ctzl51ojhQWakQQpmOvXWfjQ==" + }, "os-homedir": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", @@ -4182,6 +4213,11 @@ "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" }, + "os-utils": { + "version": "0.0.14", + "resolved": "https://registry.npmjs.org/os-utils/-/os-utils-0.0.14.tgz", + "integrity": "sha1-KeURaXsZgrjGJ3Ihdf45eX72QVY=" + }, "osenv": { "version": "0.1.5", "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", diff --git a/package.json b/package.json index e3e4dba..81d76df 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,10 @@ "colors": "^1.4.0", "discord.js": "^13.3.1", "node-fetch": "^2.6.1", + "node-os-utils": "^1.3.6", "node-vibrant": "^3.2.1-alpha.1", + "os": "^0.1.2", + "os-utils": "^0.0.14", "sequelize": "^6.7.0", "sqlite": "^4.0.23", "sqlite3": "^5.0.2" diff --git a/src/app/cfg/app.js b/src/app/cfg/app.js index 71d777c..1d22677 100644 --- a/src/app/cfg/app.js +++ b/src/app/cfg/app.js @@ -50,7 +50,7 @@ const app = { totalSeconds %= 3600; let minutes = Math.floor(totalSeconds / 60); let seconds = totalSeconds % 60; - let HR = `**${days} days, ${hours} hours, ${minutes} minutes and ${Math.round(seconds)} seconds**`; + let HR = `${days} days, ${hours} hours, ${minutes} minutes and ${Math.round(seconds)} seconds`; if (days == 0) HR = HR.replace(days + " days, ", ""); else if (days == 1) HR = HR.replace("days", "day"); @@ -422,7 +422,8 @@ const app = { { name: "node-fetch", required: true }, { name: "discord.js", required: true }, { name: "sequelize", required: true }, - { name: "http", required: false }, + { name: "os", required: true}, + { name: "node-os-utils", required: true}, { name: "canvas", required: false } ] } diff --git a/src/app/cmds/General/about.js b/src/app/cmds/General/about.js new file mode 100644 index 0000000..868bbf1 --- /dev/null +++ b/src/app/cmds/General/about.js @@ -0,0 +1,43 @@ +module.exports = { + name: "about", + description: `Get info about me, ${app.client.user.tag}!`, + guildOnly: false, + authorizedGuilds: [], + hidden: false, + permissions: ["DEFAULT"], + cooldown: 2, + aliases: ["botinfo", "aboutme"], + syntax: [], + execute: async(app, message, args) => { + const os = app.modules["os"]; // Welcome to os(u)~! + app.functions.msgHandler(message, { + embeds: [{ + title: app.config.system.emotes.information + ` All about your favorite bot, **${app.client.user.tag}**!`, + color: app.config.system.embedColors.blue, + thumbnail: { url: app.client.user.displayAvatarURL({ format: 'png', dynamic: true, size: 1024 }) }, + fields: [ + { name: "Bot Information", value: "** **" }, + { name: "User Tag", value: `${app.client.user.tag}`, inline: true}, + { name: "User ID", value: `${app.client.user.id}`, inline: true}, + { name: "Bot Version", value: app.version.toFullString(), inline: true}, + { name: "Bot Uptime", value: app.functions.TStoHR(app.client.uptime), inline: true}, + { name: "Emote Count", value: `${Object.keys(app.config.system.emotes).length} total`, inline: true}, + { name: "Embed Color Count", value: `${Object.keys(app.config.system.embedColors).length} total`, inline: true}, + { name: "RPS Count", value: `${Object.keys(app.config.system.rotatingStatus.statuses).length} total`, inline: true}, + { name: "Bot Memory Usage", value: (Math.round(process.memoryUsage().heapUsed / 1024 / 1024 * 100) / 100) + " MiB", inline: true }, + { name: "Servers I'm In", value: app.client.guilds.cache.size + " total", inline: true}, + { name: "Host System Information", value: "** **" }, + { name: "Node Version", value: `${process.version}`, inline: true }, + { name: "Node Uptime", value: app.functions.TStoHR(process.uptime()* 1000), inline: true }, + { name: "Node Execution Path", value: `${process.execPath}`, inline: true}, + { name: "Process PID", value: `${process.pid}`, inline: true}, + { name: "System Platform", value: `${process.platform}`, inline: true}, + { name: ((process.platform == "linux") ? "Kernel Version" : "System Version"), value: os.version(), inline: true } + // I'd like to have this show the current CPU usage, I'm open to ideas on how to get it to work. - IDeletedSystem64 + ], + footer: { text: app.config.system.footerText } + }] + }); + } + } + diff --git a/src/app/extras/extras.json.example b/src/app/extras/extras.json.example deleted file mode 100644 index 7fdb1dc..0000000 --- a/src/app/extras/extras.json.example +++ /dev/null @@ -1,6 +0,0 @@ -[{ - "extraName": "Web", - "extraCfg": "web/web.json", - "extraApp": "web/web.js", - "extraEnab": true -}] \ No newline at end of file