diff --git a/commands/utility/about.js b/commands/utility/about.js index 6787ce6..f3eff56 100644 --- a/commands/utility/about.js +++ b/commands/utility/about.js @@ -4,7 +4,7 @@ import { exec } from 'node:child_process'; import db from '../../models/index.js'; const donator = db.donator; -const { ownerId } = process.env; +const { ownerId, uptimePage } = process.env; export default { data: new SlashCommandBuilder() @@ -51,7 +51,8 @@ export default { { name: 'Current maintainer', value: `${maintainer.tag} (${ownerId})` }, { name: 'Gitea (Main)', value: 'https://git.namejeff.xyz/Supositware/Haha-Yes', inline: true }, { name: 'Github (Mirror)', value: 'https://github.com/Supositware/Haha-yes', inline: true }, - { name: 'Privacy Policy', value: 'https://libtar.de/discordprivacy.txt' }, + { name: 'Privacy Policy', value: 'https://libtar.de/discordprivacy.txt', inline: true }, + { name: 'Status page', value: uptimePage.toString(), inline: true }, ) .setFooter({ text: `Original bot made by ${owner.tag} (267065637183029248)` }); diff --git a/commands/utility/ping.js b/commands/utility/ping.js index 3afda3e..33e69d5 100644 --- a/commands/utility/ping.js +++ b/commands/utility/ping.js @@ -1,11 +1,21 @@ -import { SlashCommandBuilder } from 'discord.js'; - +import { SlashCommandBuilder, ButtonBuilder, ActionRowBuilder, ButtonStyle } from 'discord.js'; +const { uptimePage } = process.env; export default { data: new SlashCommandBuilder() .setName('ping') .setDescription('Replies with Pong!'), category: 'utility', async execute(interaction) { - await interaction.reply(`Pong! \`${Math.round(interaction.client.ws.ping)} ms\``); + + const row = new ActionRowBuilder() + .addComponents( + new ButtonBuilder() + .setLabel('Status page') + .setURL(uptimePage) + .setStyle(ButtonStyle.Link), + ); + + + await interaction.reply({ content: `Pong! \`${Math.round(interaction.client.ws.ping)} ms\``, components: [row] }); }, };