mirror of
https://github.com/toast-ts/Daggerbot-TS.git
synced 2024-11-17 16:30:58 -05:00
someone: uwotm8
This commit is contained in:
parent
f19e926105
commit
7dfeec7667
@ -1,8 +1,8 @@
|
|||||||
import Discord,{SlashCommandBuilder, version} from 'discord.js';
|
import Discord,{SlashCommandBuilder} from 'discord.js';
|
||||||
import { TClient } from 'src/client';
|
import { TClient } from 'src/client';
|
||||||
import si from 'systeminformation';
|
import si from 'systeminformation';
|
||||||
import os from 'node:os';
|
import os from 'node:os';
|
||||||
import { versionMajorMinor } from 'typescript';
|
import { version } from 'typescript';
|
||||||
import { VERSION } from 'ts-node';
|
import { VERSION } from 'ts-node';
|
||||||
export default {
|
export default {
|
||||||
async run(client: TClient, interaction: Discord.ChatInputCommandInteraction<'cached'>){
|
async run(client: TClient, interaction: Discord.ChatInputCommandInteraction<'cached'>){
|
||||||
@ -47,19 +47,20 @@ export default {
|
|||||||
const i = Math.floor(Math.log(bytes) / Math.log(k));
|
const i = Math.floor(Math.log(bytes) / Math.log(k));
|
||||||
return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i];
|
return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i];
|
||||||
}
|
}
|
||||||
|
var DJSver = require('discord.js').version;
|
||||||
const cpu = await si.cpu();
|
const cpu = await si.cpu();
|
||||||
const ram = await si.mem();
|
const ram = await si.mem();
|
||||||
const osInfo = await si.osInfo();
|
const osInfo = await si.osInfo();
|
||||||
const currentLoad = await si.currentLoad();
|
const currentLoad = await si.currentLoad();
|
||||||
const embed1 = new client.embed().setColor(client.config.embedColor).setTitle('Statistics: Host Info').setDescription([
|
const embed1 = new client.embed().setColor(client.config.embedColor).setTitle('Statistics: Host Info').setDescription([
|
||||||
`> __Dependencies__`,
|
`> __Dependencies__`,
|
||||||
`**TypeScript:** ${versionMajorMinor}`,
|
`**TypeScript:** ${version}`,
|
||||||
`**TS-Node:** ${VERSION}`,
|
`**TS-Node:** ${VERSION}`,
|
||||||
`**NodeJS:** ${process.version}`,
|
`**NodeJS:** ${process.version}`,
|
||||||
`**DiscordJS:** ${version}`,
|
`**DiscordJS:** ${DJSver}`,
|
||||||
`> __Host__`,
|
`> __Host__`,
|
||||||
`**Operating System:** ${osInfo.distro + ' ' + osInfo.release}`,
|
`**Operating System:** ${osInfo.distro + ' ' + osInfo.release}`,
|
||||||
`**CPU:** ${cpu.manufacturer, cpu.brand}`,
|
`**CPU:** ${cpu.manufacturer} ${cpu.brand}`,
|
||||||
`**Memory:** ${formatBytes(ram.used)}/${formatBytes(ram.total)}`,
|
`**Memory:** ${formatBytes(ram.used)}/${formatBytes(ram.total)}`,
|
||||||
`**NodeJS:** ${formatBytes(process.memoryUsage().heapUsed)}/${formatBytes(process.memoryUsage().heapTotal)}`,
|
`**NodeJS:** ${formatBytes(process.memoryUsage().heapUsed)}/${formatBytes(process.memoryUsage().heapTotal)}`,
|
||||||
`**Load Usage:**\nUser: ${currentLoad.currentLoadUser.toFixed(1)}%\nSystem: ${currentLoad.currentLoadSystem.toFixed(1)}%`,
|
`**Load Usage:**\nUser: ${currentLoad.currentLoadUser.toFixed(1)}%\nSystem: ${currentLoad.currentLoadSystem.toFixed(1)}%`,
|
||||||
|
Loading…
Reference in New Issue
Block a user