2022-07-05 12:29:14 -05:00
|
|
|
const Uptime = require('../functions/uptime.js');
|
2022-07-01 19:43:28 -05:00
|
|
|
const os = require('os');
|
|
|
|
const osu = require('node-os-utils');
|
|
|
|
const cpu = osu.cpu;
|
|
|
|
|
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',
|
2022-04-21 20:53:03 -05:00
|
|
|
options: [],
|
2021-01-20 11:29:05 -06:00
|
|
|
|
2022-04-21 23:44:02 -05:00
|
|
|
async parseMessage (client, config, message) {
|
|
|
|
await message.channel.send(this.handle(client, config, message.author));
|
|
|
|
},
|
|
|
|
|
|
|
|
async parseInteraction (client, config, interaction) {
|
|
|
|
await interaction.reply(this.handle(client, config, interaction.user));
|
|
|
|
},
|
|
|
|
|
2022-07-01 19:43:28 -05:00
|
|
|
handle (client, config, user) {
|
2022-04-21 23:44:02 -05:00
|
|
|
return {
|
2022-04-21 18:09:21 -05:00
|
|
|
embeds: [{
|
|
|
|
title: '<:AnitroxInfo:809651936831733791> Information about Anitrox',
|
|
|
|
description: "Everything you've ever wanted to know about your favorite bot, Anitrox!",
|
|
|
|
color: 9442302,
|
|
|
|
footer: {
|
2022-04-21 23:44:02 -05:00
|
|
|
icon_url: user.displayAvatarURL(),
|
2022-04-21 18:09:21 -05:00
|
|
|
text: config.footerTxt
|
2022-03-26 03:33:18 -05:00
|
|
|
},
|
2022-04-21 18:09:21 -05:00
|
|
|
thumbnail: {
|
|
|
|
url: client.user.displayAvatarURL()
|
2022-03-26 03:33:18 -05:00
|
|
|
},
|
2022-04-21 18:09:21 -05:00
|
|
|
fields: [
|
|
|
|
{
|
|
|
|
name: 'Bot Information',
|
|
|
|
value: '** **'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Release Type',
|
|
|
|
value: config.release,
|
|
|
|
inline: true
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Release Version',
|
|
|
|
value: config.build,
|
|
|
|
inline: true
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Uptime',
|
|
|
|
value: Uptime(client.uptime),
|
|
|
|
inline: true
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: '<:memory:793536677737136178> Bot Memory Usage',
|
|
|
|
value: `${(process.memoryUsage().heapUsed / 1024 / 1024).toFixed(2)} MiB`,
|
|
|
|
inline: true
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Bot Name',
|
|
|
|
value: client.user.tag,
|
|
|
|
inline: true
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Bot ID',
|
|
|
|
value: `\`${client.user.id}\``,
|
|
|
|
inline: true
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: '<:hostinfo:793529505263517747> Host Information',
|
|
|
|
value: '** **'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: '<:hostinfo:793529505263517747> Host Uptime',
|
|
|
|
value: Uptime(os.uptime() * 1000)
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: '<:cpu:793672442056802354> CPU Type',
|
|
|
|
value: `${process.arch}, ${cpu.model()}`
|
|
|
|
},
|
2022-03-26 03:33:18 -05:00
|
|
|
|
2022-04-21 18:09:21 -05:00
|
|
|
{
|
|
|
|
name: '<:hostos:793866961675223090> OS Type',
|
|
|
|
value: `${process.platform} / ${os.version()}`
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: '<:node:793537507018145813> Node.JS Version',
|
|
|
|
value: process.version
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: '<:hostinfo:793529505263517747> Bot Ping',
|
|
|
|
value: `${Math.round(client.ws.ping)} ms`,
|
|
|
|
inline: true
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: '**Special Thanks To**',
|
|
|
|
value: '@OfficialTCGMatt for providing help with development\n @chuu_shi Allowing me to host Anitrox on his server'
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}]
|
2022-04-21 23:44:02 -05:00
|
|
|
};
|
2022-03-26 03:33:18 -05:00
|
|
|
}
|
|
|
|
};
|