aboutsummaryrefslogtreecommitdiff
path: root/bot/src/commands/info.js
blob: 64d8f7a5d0f6df3e01b3d4a5874fb7359aecd886 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import { SlashCommandBuilder, EmbedBuilder, version } from 'discord.js';
import { hostname, platform, release } from 'os';
import { abEmbedColour } from '../storage/consts.js';

export default {
    data: new SlashCommandBuilder()
        .setName('info')
        .setDescription('Shows information about the host.'),
    async execute(interaction) {
        const embed = new EmbedBuilder()
            .setTitle('Information on AleeBot\'s Host')
            .addFields(
                { name: 'OS Hostname: ', value: hostname(), inline: true },
                { name: 'NodeJS Version: ', value: process.versions.node, inline: true },
                { name: 'Discord.JS Version: ', value: version, inline: true },
                { name: 'OS Platform: ', value: platform(), inline: true },
                { name: 'OS Version: ', value: release(), inline: true }
            )
            .setColor(abEmbedColour);
        return await interaction.reply({ embeds: [embed] });
    }
};