2022-09-12 11:21:30 +02:00
|
|
|
import { SlashCommandBuilder, ButtonBuilder, ActionRowBuilder, ButtonStyle } from 'discord.js';
|
|
|
|
const { uptimePage } = process.env;
|
2022-06-17 01:25:05 +02:00
|
|
|
export default {
|
2022-06-16 09:18:39 +02:00
|
|
|
data: new SlashCommandBuilder()
|
|
|
|
.setName('ping')
|
|
|
|
.setDescription('Replies with Pong!'),
|
2022-08-28 17:03:15 +02:00
|
|
|
category: 'utility',
|
2024-06-25 18:06:34 +02:00
|
|
|
integration_types: [0, 1],
|
2022-09-12 11:21:30 +02:00
|
|
|
|
2024-06-25 18:06:34 +02:00
|
|
|
async execute(interaction) {
|
2022-09-12 11:21:30 +02:00
|
|
|
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] });
|
2022-06-16 09:18:39 +02:00
|
|
|
},
|
|
|
|
};
|