Skip to content
This repository was archived by the owner on Dec 19, 2018. It is now read-only.

Commit 4c8b044

Browse files
author
Matthew Ray
committed
Fix math functions in sysinfo
1 parent 285c044 commit 4c8b044

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

commands/sysinfo.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ exports.run = async (client, message) => {
1010

1111
const freegbU = os.freemem / 1000000000;
1212
const freegbR = Math.round(freegbU);
13+
const freegbF = gbR - freegbR;
1314

1415
const hours = os.uptime / 1440;
1516
const sysuptime = Math.floor(hours);
@@ -42,7 +43,7 @@ exports.run = async (client, message) => {
4243
embed.addField('CPU', `${os.cpus()[0].model}`, true);
4344
embed.addField('CPU Usage', `${process.cpuUsage().user}ms clock`, true);
4445
embed.addField('Architecture', `${os.arch}`, true);
45-
embed.addField('Memory', `${freegbR}GB/${gbR}GB`, true);
46+
embed.addField('Memory', `${freegbF}GB/${gbR}GB`, true);
4647
embed.addField('Directory', `${os.homedir()}`, true);
4748
embed.addField('Process File', `${process.mainModule.filename}` ,true);
4849
embed.addField('System Uptime', `${sysuptimeDays} days | ${sysuptime} total hours`, true);

0 commit comments

Comments
 (0)