Skip to content

Commit 377d57d

Browse files
committed
Fix formatting in execCommand.js
1 parent 647bd5c commit 377d57d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

utils/execCommand.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ export async function execCommand(client, input) {
2222
const { main: cpuTemperature } = await checkCpuTemperature();
2323
const { currentLoad: cpuUsage } = await currentLoad();
2424
const memoryTest = await mem();
25-
2625
const memoryPercentage = ((memoryTest.used / 1048576 / (memoryTest.total / 1048576)) * 100).toFixed(2);
2726

2827
const args = input.split(" ");
@@ -51,7 +50,7 @@ export async function execCommand(client, input) {
5150
.setFooter({ text: `Page ${index2}/${outputDiscord.length}`, icon: client.user.displayAvatarURL() })
5251
.setDescription(codeBlock(stripAnsi(item, true) || "No output!"));
5352

54-
if (index2 == outputDiscord.length) embed.setDescription(`${embed.data.description}\n${codeBlock(`CWD: ${client.customCWD}\nCPU: ${cpuUsage}% | RAM: ${memoryPercentage}% | Temp: ${cpuTemperature}°C`)}`);
53+
if (index2 == outputDiscord.length) embed.setDescription(`${embed.data.description}\n${codeBlock(`CWD: ${client.customCWD}\nCPU: ${Math.round(cpuUsage)}% | RAM: ${Math.round(memoryPercentage)}% | Temp: ${Math.round(cpuTemperature)}°C`)}`);
5554

5655
const finalMessage = defaultConfig.channel.messages.cache.first();
5756
if (index2 !== 1) defaultConfig.channel.send({ embeds: [embed] });

0 commit comments

Comments
 (0)