Skip to content

Commit d6edbfb

Browse files
v5 Update 8 Part 1 (#18)
* Delete 'extras.json.example' * Make TStoHR function not put time in bold by default * Add that fine fine lookin' about command *Approved and merged by TheCodingGuy; contributions provided by @IDeletedSystem64*
1 parent 9d82998 commit d6edbfb

5 files changed

Lines changed: 85 additions & 8 deletions

File tree

package-lock.json

Lines changed: 36 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@
2424
"colors": "^1.4.0",
2525
"discord.js": "^13.3.1",
2626
"node-fetch": "^2.6.1",
27+
"node-os-utils": "^1.3.6",
2728
"node-vibrant": "^3.2.1-alpha.1",
29+
"os": "^0.1.2",
30+
"os-utils": "^0.0.14",
2831
"sequelize": "^6.7.0",
2932
"sqlite": "^4.0.23",
3033
"sqlite3": "^5.0.2"

src/app/cfg/app.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ const app = {
5050
totalSeconds %= 3600;
5151
let minutes = Math.floor(totalSeconds / 60);
5252
let seconds = totalSeconds % 60;
53-
let HR = `**${days} days, ${hours} hours, ${minutes} minutes and ${Math.round(seconds)} seconds**`;
53+
let HR = `${days} days, ${hours} hours, ${minutes} minutes and ${Math.round(seconds)} seconds`;
5454

5555
if (days == 0) HR = HR.replace(days + " days, ", "");
5656
else if (days == 1) HR = HR.replace("days", "day");
@@ -422,7 +422,8 @@ const app = {
422422
{ name: "node-fetch", required: true },
423423
{ name: "discord.js", required: true },
424424
{ name: "sequelize", required: true },
425-
{ name: "http", required: false },
425+
{ name: "os", required: true},
426+
{ name: "node-os-utils", required: true},
426427
{ name: "canvas", required: false }
427428
]
428429
}

src/app/cmds/General/about.js

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
module.exports = {
2+
name: "about",
3+
description: `Get info about me, ${app.client.user.tag}!`,
4+
guildOnly: false,
5+
authorizedGuilds: [],
6+
hidden: false,
7+
permissions: ["DEFAULT"],
8+
cooldown: 2,
9+
aliases: ["botinfo", "aboutme"],
10+
syntax: [],
11+
execute: async(app, message, args) => {
12+
const os = app.modules["os"]; // Welcome to os(u)~!
13+
app.functions.msgHandler(message, {
14+
embeds: [{
15+
title: app.config.system.emotes.information + ` All about your favorite bot, **${app.client.user.tag}**!`,
16+
color: app.config.system.embedColors.blue,
17+
thumbnail: { url: app.client.user.displayAvatarURL({ format: 'png', dynamic: true, size: 1024 }) },
18+
fields: [
19+
{ name: "Bot Information", value: "** **" },
20+
{ name: "User Tag", value: `${app.client.user.tag}`, inline: true},
21+
{ name: "User ID", value: `${app.client.user.id}`, inline: true},
22+
{ name: "Bot Version", value: app.version.toFullString(), inline: true},
23+
{ name: "Bot Uptime", value: app.functions.TStoHR(app.client.uptime), inline: true},
24+
{ name: "Emote Count", value: `${Object.keys(app.config.system.emotes).length} total`, inline: true},
25+
{ name: "Embed Color Count", value: `${Object.keys(app.config.system.embedColors).length} total`, inline: true},
26+
{ name: "RPS Count", value: `${Object.keys(app.config.system.rotatingStatus.statuses).length} total`, inline: true},
27+
{ name: "Bot Memory Usage", value: (Math.round(process.memoryUsage().heapUsed / 1024 / 1024 * 100) / 100) + " MiB", inline: true },
28+
{ name: "Servers I'm In", value: app.client.guilds.cache.size + " total", inline: true},
29+
{ name: "Host System Information", value: "** **" },
30+
{ name: "Node Version", value: `${process.version}`, inline: true },
31+
{ name: "Node Uptime", value: app.functions.TStoHR(process.uptime()* 1000), inline: true },
32+
{ name: "Node Execution Path", value: `${process.execPath}`, inline: true},
33+
{ name: "Process PID", value: `${process.pid}`, inline: true},
34+
{ name: "System Platform", value: `${process.platform}`, inline: true},
35+
{ name: ((process.platform == "linux") ? "Kernel Version" : "System Version"), value: os.version(), inline: true }
36+
// I'd like to have this show the current CPU usage, I'm open to ideas on how to get it to work. - IDeletedSystem64
37+
],
38+
footer: { text: app.config.system.footerText }
39+
}]
40+
});
41+
}
42+
}
43+

src/app/extras/extras.json.example

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)