From eb94f0279df5e2f901105c8260f5d4dc1d0f1b14 Mon Sep 17 00:00:00 2001 From: AnxietyisReal <96593068+AnxietyisReal@users.noreply.github.com> Date: Tue, 13 Dec 2022 12:23:53 +1100 Subject: [PATCH] someone: uwotm8 --- src/commands/statistics.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/commands/statistics.ts b/src/commands/statistics.ts index 4b2ba02..1e25c0e 100644 --- a/src/commands/statistics.ts +++ b/src/commands/statistics.ts @@ -1,8 +1,8 @@ -import Discord,{SlashCommandBuilder, version} from 'discord.js'; +import Discord,{SlashCommandBuilder} from 'discord.js'; import { TClient } from 'src/client'; import si from 'systeminformation'; import os from 'node:os'; -import { versionMajorMinor } from 'typescript'; +import { version } from 'typescript'; import { VERSION } from 'ts-node'; export default { async run(client: TClient, interaction: Discord.ChatInputCommandInteraction<'cached'>){ @@ -47,19 +47,20 @@ export default { const i = Math.floor(Math.log(bytes) / Math.log(k)); return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i]; } + var DJSver = require('discord.js').version; const cpu = await si.cpu(); const ram = await si.mem(); const osInfo = await si.osInfo(); const currentLoad = await si.currentLoad(); const embed1 = new client.embed().setColor(client.config.embedColor).setTitle('Statistics: Host Info').setDescription([ `> __Dependencies__`, - `**TypeScript:** ${versionMajorMinor}`, + `**TypeScript:** ${version}`, `**TS-Node:** ${VERSION}`, `**NodeJS:** ${process.version}`, - `**DiscordJS:** ${version}`, + `**DiscordJS:** ${DJSver}`, `> __Host__`, `**Operating System:** ${osInfo.distro + ' ' + osInfo.release}`, - `**CPU:** ${cpu.manufacturer, cpu.brand}`, + `**CPU:** ${cpu.manufacturer} ${cpu.brand}`, `**Memory:** ${formatBytes(ram.used)}/${formatBytes(ram.total)}`, `**NodeJS:** ${formatBytes(process.memoryUsage().heapUsed)}/${formatBytes(process.memoryUsage().heapTotal)}`, `**Load Usage:**\nUser: ${currentLoad.currentLoadUser.toFixed(1)}%\nSystem: ${currentLoad.currentLoadSystem.toFixed(1)}%`,