forked from Supositware/Haha-Yes
Link to status page
parent
c4574e47f6
commit
fcc23324f2
@ -1,11 +1,21 @@
|
|||||||
import { SlashCommandBuilder } from 'discord.js';
|
import { SlashCommandBuilder, ButtonBuilder, ActionRowBuilder, ButtonStyle } from 'discord.js';
|
||||||
|
const { uptimePage } = process.env;
|
||||||
export default {
|
export default {
|
||||||
data: new SlashCommandBuilder()
|
data: new SlashCommandBuilder()
|
||||||
.setName('ping')
|
.setName('ping')
|
||||||
.setDescription('Replies with Pong!'),
|
.setDescription('Replies with Pong!'),
|
||||||
category: 'utility',
|
category: 'utility',
|
||||||
async execute(interaction) {
|
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 New Issue