2022-04-18 11:25:40 -05:00
|
|
|
function Uptime(uptime) {
|
|
|
|
const totalSeconds = (uptime / 1000);
|
2021-01-20 11:29:05 -06:00
|
|
|
|
2022-04-18 11:25:40 -05:00
|
|
|
const days = parseInt(totalSeconds / 86400);
|
|
|
|
const hours = parseInt((totalSeconds % 86400) / 3600);
|
|
|
|
const minutes = parseInt((totalSeconds % 3600) / 60);
|
|
|
|
const seconds = parseInt(totalSeconds % 60);
|
2021-01-19 14:02:09 -06:00
|
|
|
|
2022-04-18 11:25:40 -05:00
|
|
|
const daystring = days + (days === 1 ? " day" : " days");
|
|
|
|
const hourstring = hours + (hours === 1 ? " hour" : " hours");
|
|
|
|
const minutetring = minutes + (minutes === 1 ? " minute" : " minutes");
|
|
|
|
const secondstring = seconds + (seconds === 1 ? " second" : " seconds");
|
2021-01-19 14:02:09 -06:00
|
|
|
|
2022-04-18 11:25:40 -05:00
|
|
|
return `${daystring}**, **${hourstring}**, **${minutetring}**, **${secondstring}`;
|
|
|
|
}
|
2021-01-19 14:02:09 -06:00
|
|
|
|
2022-04-18 11:25:40 -05:00
|
|
|
module.exports = {
|
2021-01-19 14:02:09 -06:00
|
|
|
|
2022-04-18 11:25:40 -05:00
|
|
|
name: require('path').parse(__filename).name,
|
|
|
|
description: 'Shows bot and host information',
|
2021-01-20 11:29:05 -06:00
|
|
|
|
2022-04-18 11:25:40 -05:00
|
|
|
async execute(client, message, _, config) {
|
2022-03-26 03:33:18 -05:00
|
|
|
const os = require("os");
|
|
|
|
const osu = require('node-os-utils');
|
|
|
|
const cpu = osu.cpu;
|
2022-04-18 11:25:40 -05:00
|
|
|
|
2022-04-21 11:29:04 -05:00
|
|
|
await message.channel.send({embeds: [{
|
2022-03-26 03:33:18 -05:00
|
|
|
"title": "<:AnitroxInfo:809651936831733791> Information about Anitrox",
|
|
|
|
"description": "Everything you've ever wanted to know about your favorite bot, Anitrox!",
|
|
|
|
"color": 9442302,
|
2022-03-26 12:31:03 -05:00
|
|
|
"footer": {
|
|
|
|
"icon_url": message.author.displayAvatarURL(),
|
2022-03-29 13:51:43 -05:00
|
|
|
"text": config.footerTxt
|
2022-03-26 12:31:03 -05:00
|
|
|
},
|
2022-03-26 03:33:18 -05:00
|
|
|
"thumbnail": {
|
|
|
|
"url": client.user.displayAvatarURL()
|
|
|
|
},
|
|
|
|
"fields": [
|
|
|
|
{
|
|
|
|
"name": "Bot Information",
|
|
|
|
"value": "** **"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "Release Type",
|
2022-03-29 13:55:44 -05:00
|
|
|
"value": config.release,
|
2022-03-26 03:33:18 -05:00
|
|
|
"inline": true
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "Release Version",
|
2022-03-29 13:55:44 -05:00
|
|
|
"value": config.build,
|
2022-03-26 03:33:18 -05:00
|
|
|
"inline": true
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "Uptime",
|
|
|
|
"value": Uptime(client.uptime),
|
|
|
|
"inline": true
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "<:memory:793536677737136178> Bot Memory Usage",
|
2022-03-26 13:20:32 -05:00
|
|
|
"value": `${(process.memoryUsage().heapUsed / 1024 / 1024).toFixed(2)} MiB`,
|
2022-03-26 03:33:18 -05:00
|
|
|
"inline": true
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "Bot Name",
|
|
|
|
"value": client.user.tag,
|
|
|
|
"inline": true
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "Bot ID",
|
2022-03-26 13:20:32 -05:00
|
|
|
"value": `\`${client.user.id}\``,
|
2022-03-26 03:33:18 -05:00
|
|
|
"inline": true
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "<:hostinfo:793529505263517747> Host Information",
|
|
|
|
"value": "** **"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "<:hostinfo:793529505263517747> Host Uptime",
|
|
|
|
"value": Uptime(os.uptime() * 1000)
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "<:cpu:793672442056802354> CPU Type",
|
2022-03-26 13:20:32 -05:00
|
|
|
"value": `${process.arch}, ${cpu.model()}`
|
2022-03-26 03:33:18 -05:00
|
|
|
},
|
2021-01-19 14:02:09 -06:00
|
|
|
|
2022-03-26 03:33:18 -05:00
|
|
|
{
|
|
|
|
"name": "<:hostos:793866961675223090> OS Type",
|
2022-03-26 13:20:32 -05:00
|
|
|
"value": `${process.platform} / ${os.version()}`
|
2022-03-26 03:33:18 -05:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "<:node:793537507018145813> Node.JS Version",
|
|
|
|
"value": process.version
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "<:hostinfo:793529505263517747> Bot Ping",
|
2022-03-26 13:20:32 -05:00
|
|
|
"value": `${Math.round(client.ws.ping)} ms`,
|
2022-03-26 03:33:18 -05:00
|
|
|
"inline": true
|
|
|
|
},
|
|
|
|
{
|
2022-04-14 21:15:21 -05:00
|
|
|
"name": "**Special Thanks To**",
|
2022-03-26 03:33:18 -05:00
|
|
|
"value": "@OfficialTCGMatt for providing help with development\n @chuu_shi Allowing me to host Anitrox on his server"
|
2021-01-19 14:02:09 -06:00
|
|
|
}
|
2022-03-26 03:33:18 -05:00
|
|
|
|
|
|
|
]
|
2022-04-21 11:29:04 -05:00
|
|
|
}]});
|
2022-03-26 03:33:18 -05:00
|
|
|
}
|
|
|
|
};
|