forked from Supositware/Haha-Yes
Link to status page
This commit is contained in:
parent
c4574e47f6
commit
fcc23324f2
2 changed files with 16 additions and 5 deletions
|
@ -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)` });
|
||||
|
|
|
@ -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] });
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue