Skip to content

Commit

Permalink
Fix formatting in execCommand.js
Browse files Browse the repository at this point in the history
  • Loading branch information
IgorKowalczyk committed Dec 24, 2023
1 parent 647bd5c commit 377d57d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions utils/execCommand.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ export async function execCommand(client, input) {
const { main: cpuTemperature } = await checkCpuTemperature();
const { currentLoad: cpuUsage } = await currentLoad();
const memoryTest = await mem();

const memoryPercentage = ((memoryTest.used / 1048576 / (memoryTest.total / 1048576)) * 100).toFixed(2);

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

if (index2 == outputDiscord.length) embed.setDescription(`${embed.data.description}\n${codeBlock(`CWD: ${client.customCWD}\nCPU: ${cpuUsage}% | RAM: ${memoryPercentage}% | Temp: ${cpuTemperature}°C`)}`);
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`)}`);

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

0 comments on commit 377d57d

Please sign in to comment.